Advice needed for hosting of iCal (.ics) files.

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/28/2011 4:54:05 AM
Gravatar
Total Posts 6

Advice needed for hosting of iCal (.ics) files.

Hi all,

I'm starting to chase my tail a bit here and thought I'd stop and ask some advice.

My website converts a txt roster file that a user uploads into an ical format for importing to calendar applications.

The aim is to have a per user URL that they can use to subscribe to their calendar from anywhere, google calendar, iPhone, Outlook etc.

At the moment its not working terribly well. The iPhone seems to be the main problem with refusing to link to the hosted ical files. Presently the ical files are hosted as files on the server and served as standard static resource by IIS with the mime type set to text/calendar.

Ive been plugging away and now have my main functionality implemented into a MP module, with the generated ical output being saved into a DB.

I need to get this ics 'file' to the end user.

At the moment I would like to use a restful service that the user can access with a http get at something like: www.sitename/[a guid]

At the moment I cant get the extensionless URLs working with IIS Express for some reason, and Im testing the restful routing with the code in BlogViewCategory being uncommented and I cant get a breakpoint on that code to hit with a sample URL being tried.

Im still trying to work out how MP does services, there are lots of them floating around, Perhaps Joe, could you suggest one that is simple for a n00b like me to understand and replicate?

Is there an easier way?

Eventually I will just send the ical as listed in this stackoverflow question

Thanks

Steve.

 

2/28/2011 9:22:02 AM
Gravatar
Total Posts 18439

Re: Advice needed for hosting of iCal (.ics) files.

I'd probably implement it as a simple .ashx IHttpHandler and pass a query string params as you plan.

You can find examples of .ashx serives under Web/Services in the source code, CKEditorTemplate.ashx for example returns json, but you could return ical data.

Probably what I would try at first is just making the .ashx read the static file from disk and write it to the response. Verify it looks right in the browser and then try it with devices.

You may want to verify whether that is really the right mime type, if it does not work with a static file then it probably won't work with a service either unless the reason it does not work is something about caching, you could get more control over caching from the .ashx and try disabling all caching and see if that makes any difference.

Then after you get it working with static content, add logic to get the data from the db instead.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.