1

I have a website that is a calendar with all the basic features (ASP.NET MVC and SQL Server). People can enter events, view others events, etc. One person asked me if there was a way they can see these events in their Outlook calendar - as a second calendar.

I have all of the data on the server. Is there a recommended way to have Outlook point to my web server or DB for a calendar? I see there are ways to generate iCal files from C#.

If so, how would this data stay in sync as new events are created, deleted, etc? A one time dump would be ok but the concern would be that the data would get stale. Is there a solution that would keep the reference dynamic to keep them in sync. (it would only need to be a one way transfer, i don't expect the need to create or delete from Outlook, so outlook is just read only)

4

3 回答 3

1

I think you can create iCalendar file,then publish it ,so let clients subscribe your internet calendar because internet calendar subscription is periodically synchronized with a calendar that is saved on a web server,and any updates to the internet calendar are downloaded automatically into MS Outlook.

You can use DDay.Ical library for creating (.ics) files using C#.

于 2012-10-17T12:39:48.303 回答
1

assuming your question is about how to keep the client and server side synched, and since you only mention outlook as client, there is a custom way to control the update frequency: microsoft has a custom calendar property: X-PUBLISHED-TTL (see microsoft msdn calendar)

2.1.3.1.1.15 Property: X-PUBLISHED-TTL

Brief Description: Specifies a suggested iCalendar file download frequency for clients and servers with sync capabilities.

however note that this property being custom will be ignored by other calendars

于 2012-10-17T13:19:53.557 回答
0

You could try to keep track of the SEQUENCE of updates to each calendar entry in your database, and add a trigger on your table of calendar events so that it would automatically send event updates when something changes. Each update would have a higher SEQUENCE property than the updates that came before it, but the UID (the event's unique identifier) would remain the same.

For this to work, though, you'd need to be able to send iCalendar events from within your SQL Server, which can be possible using the following CLR project:

github.com/EitanBlumin/sql-clr-ics

于 2019-05-26T13:04:50.573 回答