Wednesday, March 21, 2012

web app with multiple web services

Hi all, I intend on having a web app which would have many .asmx files. Some would be atlas web services and some would be regular web services. I noticed that in the web.config it changes the httphandler for .asmx files. Will this affect all my .asmx files? Is there anyway to restrict this based on folder paths etc?
TIA!Yes, you can restrict handlers to specific files or directories.
Please note that even though the .asmx requests are now handled by adifferent handler, it should not break anything. All this handler doesis return a JavaScript proxy when someone requested the service withthe "/js" pathinfo, such as myservice.asmx/js. All other requestsshould just be forwarded to the original handler.

How do I restrict handlers for certain folders? Also, it appears that my <pages> element is causing problems for my webservice folder. Specifically the autoeventwireup property set to false fails to load the web service. But I need that set to false for my regular .aspx pages. I tried putting a new <pages> element under a location tag for that folder but no luck.
TIA!

I would suggest to collect all your ASP.NET AJAX Web services (and related pages) in one folder or subfolders of it.

In the top folder you create a Web.config file where you put the applicable configuration items that apply (move them from the application Web.vonfig).

Doing this he behavior of the runtime is the old one for all application folders but the one described above.

Let me know if it works for you.

No comments:

Post a Comment