Last post Aug 18, 2008 04:54 PM by retunsky
Apr 10, 2008 07:46 PM|spockmonster|LINK
I am using VStudio2008 with IIS on an XP Pro SP2 machine. I have created a solution which contains a Web Project which contains a Web.config which contains:
My Solution contains a Class Library project called "AliceCooper", which contains a class type named "ScaryNightmare" which implements IHttPHandler. Any request that ends in .cwe should invoke the ScaryNightmare.ProcessRequest method, and this works when
running with the VStudio Development Webserver. For example, if I use my browser to navigate to
http://localhost/AliceCooper/Mike.cwe, the request is forwarded to my IHttpHandler ScaryNightmare, which is exactly what I want.
When deployed to the machine IIS, the assembly "AliceCooper.dll" is copied to the Virtual Directory, and I created a "bin" folder in the Virtual Directory and copied the dll into that folder as well. I do not want to put the dll in the GAC, and per SDK
it should be searched for in local "bin" folder. But ... requests ending in .cwe (such as
http://localhost/AliceCooper/Mike.cwe) result in a Page Not Found error (whereas they are correctly routed to my IHttPHandler when running with the VStudio Dev Web Server).
It is as if IIS does not see the <add> and/or doesn't konw to route *.cwe requests to my IHttpHandler. If it was the case that it did try to load the HttpHander but could not find the assembly, then I would expect to get an error message of that sort as
opposed to a PageNotFound http error.
I reviewed the web.config and machine.config from C:\Windows\NetFramework\2.0, and I don't think they are dis-allowing this tag, but i could have missed something in there. I couldn't find them in the 3.0 and 3.5 NetFramework folders...
I've restarted IIS several times to try to get it to pick up my <httpHandler> adds. I created a Web.Config in c:\inetpub\wwwroot that contains my <httpHandler> tag and restarted IIS, and I tried creating a bin folder in c:\inetpub\wwwroot and copying the
AliceCooper.dll assembly there, but none of these have had any affect at all, all requests come back PageNotFound.
Anyone have a suggestion?
HttpHandler BinaryWrite OutputStream
Apr 10, 2008 07:57 PM|mbanavige|LINK
unlike the built-in web server that's included with Visual Studio (essentially cassini), IIS does not route all requests for all file extensions to aspnet_isapi.dll.
First you'll need to get IIS to map the cwe extension to asp.net (part of the IIS application configuration settings), and then your web.config settings will kick in.
Apr 10, 2008 08:32 PM|spockmonster|LINK
Okay, I added an Application Mapping into the Default Website, mapping ".cwe" to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll, All verbs, VerifyFileExists==false, ScriptEngine==true. This is found in IIS Admin <DefaultWeb Site> properties'
HomeDirectory tab [Configuration] button. Then I restarted the WebServer (in IIS Admin). Is working fine now.
Aug 18, 2008 04:54 PM|retunsky|LINK
I have the same problem. Configuring of a custom extension didn't help - any request returns 404 error.
However it works under Visual Studio without any issues.
I even tried to use already configured extensions, but it's all the same - 404.
<add verb="GET,POST" path="*.asmx"
type="TestApplication.TestHandler, TestApplication" />
Request is like:
TestApplication.dll is located under 'C:\inetpub\wwwroot\testapp\bin\TestApplication.dll",
where "C:\inetpub\wwwroot" is the root of the Default Web Site.
Do you have the slightest idea what could be wrong?
PS: The OS is Win XP Pro x64, IIS 6.0, ASP .NET 2.0.50727
I simply reinstalled IIS and it helped.