Home All Groups Group Topic Archive Search About

virtual file works in VS 2008, not IIS

Author
3 Jun 2009 11:38 PM
David Thielen
Hi;

I create avitars in a program Avitar.cs. Works great in VS 2008, not
in IIS. In IIS https://www.windwardreports.com/apps/avitar-6097.png
returns an error 404

In VS2008 http://localhost:2716/store/avitar-6097.png works fine.

In VS 2008 I have:
    <httpHandlers>
        <add verb="*" path="avitar-*.*" type="Avitar"/>
    </httpHandlers>

In IIS I have tried both
    <httpHandlers>
        <add verb="*" path="avitar-*.*" type="Avitar"/>
    </httpHandlers>

and
    <httpHandlers>
        <add verb="*" path="apps/avitar-*.*" type="Avitar"/>
    </httpHandlers>

But neither works. I know it's something simple but I can't figure it
out.

help - thanks - dave


david@at-at***@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Author
4 Jun 2009 1:52 AM
Allen Chen [MSFT]
Hi Dave,

>I create avitars in a program Avitar.cs. Works great in VS 2008, not
>in IIS. In IIS https://www.windwardreports.com/apps/avitar-6097.png
>returns an error 404


For IIS 7 please add the handler in the following position of web.config:

<system.webServer>
      <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <remove name="ScriptHandlerFactory" />
        <remove name="ScriptHandlerFactoryAppServices" />
        <remove name="ScriptResource" />

<!--Register your handler here, and speicify a name for it, for instance,
<add name="MyHttpHandler" verb="*" path="*.*" type="LogComponent.MyHandler"
/>-->


        <add name="ScriptHandlerFactory" verb="*" path="*.asmx"
preCondition="integratedMode"
             type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*"
path="*_AppService.axd" preCondition="integratedMode"
             type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptResource" preCondition="integratedMode"
verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </handlers>
    </system.webServer>

After publishing you can check the Handler Mappings of this site in IIS.
The handler you registered should appear there. If not you can manually
register it by click "Add Managed Handler" in the actions panel.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Are all your drivers up to date? click for free checkup

Author
4 Jun 2009 2:05 AM
David Thielen
thank you - will try tomorrow.

And why on earth did they go from something simple to such an
unbelieveable mess?

thanks - dave


On Thu, 04 Jun 2009 01:52:32 GMT, all***@online.microsoft.com (Allen
Chen [MSFT]) wrote:

Show quoteHide quote
>Hi Dave,
>
>>I create avitars in a program Avitar.cs. Works great in VS 2008, not
>>in IIS. In IIS https://www.windwardreports.com/apps/avitar-6097.png
>>returns an error 404
>
>
>For IIS 7 please add the handler in the following position of web.config:
>
><system.webServer>
>      <handlers>
>        <remove name="WebServiceHandlerFactory-Integrated"/>
>        <remove name="ScriptHandlerFactory" />
>        <remove name="ScriptHandlerFactoryAppServices" />
>        <remove name="ScriptResource" />
>       
><!--Register your handler here, and speicify a name for it, for instance,
><add name="MyHttpHandler" verb="*" path="*.*" type="LogComponent.MyHandler"
>/>-->
>
>       
>        <add name="ScriptHandlerFactory" verb="*" path="*.asmx"
>preCondition="integratedMode"
>             type="System.Web.Script.Services.ScriptHandlerFactory,
>System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
>PublicKeyToken=31BF3856AD364E35"/>
>        <add name="ScriptHandlerFactoryAppServices" verb="*"
>path="*_AppService.axd" preCondition="integratedMode"
>             type="System.Web.Script.Services.ScriptHandlerFactory,
>System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
>PublicKeyToken=31BF3856AD364E35"/>
>        <add name="ScriptResource" preCondition="integratedMode"
>verb="GET,HEAD" path="ScriptResource.axd"
>type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
>Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
>      </handlers>
>    </system.webServer>
>
>After publishing you can check the Handler Mappings of this site in IIS.
>The handler you registered should appear there. If not you can manually
>register it by click "Add Managed Handler" in the actions panel.
>
>Regards,
>Allen Chen
>Microsoft Online Support
>
>Delighting our customers is our #1 priority. We welcome your comments and
>suggestions about how we can improve the support we provide to you. Please
>feel free to let my manager know what you think of the level of service
>provided. You can send feedback directly to my manager at:
>msd***@microsoft.com.
>
>==================================================
>Get notification to my posts through email? Please refer to
>http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
>
>Note: MSDN Managed Newsgroup support offering is for non-urgent issues
>where an initial response from the community or a Microsoft Support
>Engineer within 2 business day is acceptable. Please note that each follow
>up response may take approximately 2 business days as the support
>professional working with you may need further investigation to reach the
>most efficient resolution. The offering is not appropriate for situations
>that require urgent, real-time or phone-based interactions. Issues of this
>nature are best handled working with a dedicated Microsoft Support Engineer
>by contacting Microsoft Customer Support Services (CSS) at
>http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
>==================================================
>This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>


david@at-at***@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Author
4 Jun 2009 2:31 AM
Juan T. Llibre
Don't forget to do the simple "which account needs permissions" test code I posted.




Juan T. Llibre, asp.net MVP
¿ Estas probando VS 2010 y ASP.NET 4.0 ?
Regístrate (gratis) en los Foros de VS 2010 y ASP.NET 4.0, en español
http://asp.net.do/foros/forums/
=====================================================
Show quoteHide quote
"David Thielen" <thielen@nospam.nospam> wrote in message news:duae25d751rvst9njo7k30bbtah263rvcs@4ax.com...
> thank you - will try tomorrow.
>
> And why on earth did they go from something simple to such an
> unbelieveable mess?
>
> thanks - dave
>
>
> On Thu, 04 Jun 2009 01:52:32 GMT, all***@online.microsoft.com (Allen
> Chen [MSFT]) wrote:
>
>>Hi Dave,
>>
>>>I create avitars in a program Avitar.cs. Works great in VS 2008, not
>>>in IIS. In IIS https://www.windwardreports.com/apps/avitar-6097.png
>>>returns an error 404
>>
>>
>>For IIS 7 please add the handler in the following position of web.config:
>>
>><system.webServer>
>>      <handlers>
>>        <remove name="WebServiceHandlerFactory-Integrated"/>
>>        <remove name="ScriptHandlerFactory" />
>>        <remove name="ScriptHandlerFactoryAppServices" />
>>        <remove name="ScriptResource" />
>>
>><!--Register your handler here, and speicify a name for it, for instance,
>><add name="MyHttpHandler" verb="*" path="*.*" type="LogComponent.MyHandler"
>>/>-->
>>
>>
>>        <add name="ScriptHandlerFactory" verb="*" path="*.asmx"
>>preCondition="integratedMode"
>>             type="System.Web.Script.Services.ScriptHandlerFactory,
>>System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
>>PublicKeyToken=31BF3856AD364E35"/>
>>        <add name="ScriptHandlerFactoryAppServices" verb="*"
>>path="*_AppService.axd" preCondition="integratedMode"
>>             type="System.Web.Script.Services.ScriptHandlerFactory,
>>System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
>>PublicKeyToken=31BF3856AD364E35"/>
>>        <add name="ScriptResource" preCondition="integratedMode"
>>verb="GET,HEAD" path="ScriptResource.axd"
>>type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
>>Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
>>      </handlers>
>>    </system.webServer>
>>
>>After publishing you can check the Handler Mappings of this site in IIS.
>>The handler you registered should appear there. If not you can manually
>>register it by click "Add Managed Handler" in the actions panel.
>>
>>Regards,
>>Allen Chen
>>Microsoft Online Support
>>
>>Delighting our customers is our #1 priority. We welcome your comments and
>>suggestions about how we can improve the support we provide to you. Please
>>feel free to let my manager know what you think of the level of service
>>provided. You can send feedback directly to my manager at:
>>msd***@microsoft.com.
>>
>>==================================================
>>Get notification to my posts through email? Please refer to
>>http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
>>
>>Note: MSDN Managed Newsgroup support offering is for non-urgent issues
>>where an initial response from the community or a Microsoft Support
>>Engineer within 2 business day is acceptable. Please note that each follow
>>up response may take approximately 2 business days as the support
>>professional working with you may need further investigation to reach the
>>most efficient resolution. The offering is not appropriate for situations
>>that require urgent, real-time or phone-based interactions. Issues of this
>>nature are best handled working with a dedicated Microsoft Support Engineer
>>by contacting Microsoft Customer Support Services (CSS) at
>>http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
>>==================================================
>>This posting is provided "AS IS" with no warranties, and confers no rights.
>>
>>
>>
>
>
> david@at-at***@windward.dot.dot.net
> Windward Reports -- http://www.WindwardReports.com
> me -- http://dave.thielen.com
>
> Cubicle Wars - http://www.windwardreports.com/film.htm
Author
4 Jun 2009 2:45 AM
Allen Chen [MSFT]
Hi Dave,

>And why on earth did they go from something simple to such an
>unbelieveable mess?

IIS 7 supports both classic mode and integrated mode. Therefore the ways to
register HttpHandler are different for these two modes. (and different with
IIS 6)

You can refer to this documentation to learn how to register HttpHandler:

http://msdn.microsoft.com/en-us/library/46c5ddfy.aspx

Regards,
Allen Chen
Microsoft Online Support
Author
10 Jun 2009 5:59 AM
Allen Chen [MSFT]
Hi Dave,

>thank you - will try tomorrow.

Have you solved this issue?

Regards,
Allen Chen
Microsoft Online Support
Author
15 Jun 2009 4:36 AM
David Thielen
On Wed, 10 Jun 2009 05:59:23 GMT, all***@online.microsoft.com (Allen
Chen [MSFT]) wrote:

>Hi Dave,
>
>>thank you - will try tomorrow.
>
>Have you solved this issue?
>
>Regards,
>Allen Chen
>Microsoft Online Support


david@at-at***@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Author
15 Jun 2009 4:36 AM
David Thielen
Not yet - still trying different things.

thanks - dave


On Wed, 10 Jun 2009 05:59:23 GMT, all***@online.microsoft.com (Allen
Chen [MSFT]) wrote:

>Hi Dave,
>
>>thank you - will try tomorrow.
>
>Have you solved this issue?
>
>Regards,
>Allen Chen
>Microsoft Online Support


david@at-at***@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Author
15 Jun 2009 5:44 AM
Allen Chen [MSFT]
Hi David,

>Not yet - still trying different things.

>thanks - dave

Please keep me updated if you've solved this issue or need further
assistance on it. I'll do my best to follow up.

Regards,
Allen Chen
Microsoft Online Support
Author
24 Jun 2009 9:11 AM
Allen Chen [MSFT]
Hi Dave,

>Not yet - still trying different things.

>thanks - dave

Do you have any progress on this issue?

Regards,
Allen Chen
Microsoft Online Support
Author
25 Jun 2009 9:59 PM
David Thielen
Still experimenting - the lack of any error messages is killer.

thanks - dave


On Wed, 24 Jun 2009 09:11:40 GMT, all***@online.microsoft.com (Allen
Chen [MSFT]) wrote:

>Hi Dave,
>
>>Not yet - still trying different things.
>
>>thanks - dave
>
>Do you have any progress on this issue?
>
>Regards,
>Allen Chen
>Microsoft Online Support


david@at-at***@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Author
26 Jun 2009 1:23 AM
Allen Chen [MSFT]
Hi Dave,

>Still experimenting - the lack of any error messages is killer.

Do you mean after registering the handler in <system.webServer> you still
get 404 error?

Could you try the following way to add the handler? It's another option
that uses IIS UI to add managed handler. Can it work?

http://learn.iis.net/page.aspx/366/developing-iis-70-modules-and-handlers-wi
th-the-net-framework/


Regards,
Allen Chen
Microsoft Online Support
Author
29 Jun 2009 1:39 AM
David Thielen
Got it working!!! Your instructions were exactly right, we had 1 thing
get dropped in communication between 3 people here.

thanks - dave


On Fri, 26 Jun 2009 01:23:53 GMT, all***@online.microsoft.com (Allen
Chen [MSFT]) wrote:

Show quoteHide quote
>Hi Dave,
>
>>Still experimenting - the lack of any error messages is killer.
>
>Do you mean after registering the handler in <system.webServer> you still
>get 404 error?
>
>Could you try the following way to add the handler? It's another option
>that uses IIS UI to add managed handler. Can it work?
>
>http://learn.iis.net/page.aspx/366/developing-iis-70-modules-and-handlers-wi
>th-the-net-framework/
>
>
>Regards,
>Allen Chen
>Microsoft Online Support


david@at-at***@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Author
29 Jun 2009 2:26 AM
Allen Chen [MSFT]
Glad to know that :)

Thank you for using our Newsgroup Support Service!

Regards,
Allen Chen
Microsoft Online Community Support


=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com. 
=================================================
Author
4 Jun 2009 2:04 AM
Juan T. Llibre
re:
!> neither works

You have a permissions problem.

You need to check which account ASP.NET is running as.

When you use the ASP.NET Development server in VS 2008,
ASP.NET runs as the machine\Administrator account.

When you use IIS, ASP.NET runs as a different account.

Under Windows Server 2003, that account usually is Network Service.
It may be different when IIS runs under a different OS.

Save this code as "identity.aspx" and run it in IIS :

<%@ Page Language="VB" %>
<html>
<head>
</head>
<body>
<%
Response.Write("ASP.NET is running as the account : " & Environment.Username)
%>
</body>
</html>

Running that file will tell you which account needs read/write
permissions when you run your Avatar app under IIS.




Juan T. Llibre, asp.net MVP
¿ Estas probando VS 2010 y ASP.NET 4.0 ?
Regístrate (gratis) en los Foros de VS 2010 y ASP.NET 4.0, en español
http://asp.net.do/foros/forums/
=====================================================
Show quoteHide quote
"David Thielen" <thielen@nospam.nospam> wrote in message news:e32e251gqc5h3rnhsn4e1qmlbjqjkte7ql@4ax.com...
> Hi;
>
> I create avitars in a program Avitar.cs. Works great in VS 2008, not
> in IIS. In IIS https://www.windwardreports.com/apps/avitar-6097.png
> returns an error 404
>
> In VS2008 http://localhost:2716/store/avitar-6097.png works fine.
>
> In VS 2008 I have:
> <httpHandlers>
> <add verb="*" path="avitar-*.*" type="Avitar"/>
> </httpHandlers>
>
> In IIS I have tried both
> <httpHandlers>
> <add verb="*" path="avitar-*.*" type="Avitar"/>
> </httpHandlers>
>
> and
> <httpHandlers>
> <add verb="*" path="apps/avitar-*.*" type="Avitar"/>
> </httpHandlers>
>
> But neither works. I know it's something simple but I can't figure it
> out.
>
> help - thanks - dave
>
>
> david@at-at***@windward.dot.dot.net
> Windward Reports -- http://www.WindwardReports.com
> me -- http://dave.thielen.com
>
> Cubicle Wars - http://www.windwardreports.com/film.htm
Author
4 Jun 2009 1:02 PM
David Thielen
As it's just an httpHandler and no file actually exists, is R/W
permission needed?

thanks - dave


On Wed, 3 Jun 2009 22:04:06 -0400, "Juan T. Llibre"
<nomailrepl***@nowhere.com> wrote:

Show quoteHide quote
>re:
>!> neither works
>
>You have a permissions problem.
>
>You need to check which account ASP.NET is running as.
>
>When you use the ASP.NET Development server in VS 2008,
>ASP.NET runs as the machine\Administrator account.
>
>When you use IIS, ASP.NET runs as a different account.
>
>Under Windows Server 2003, that account usually is Network Service.
>It may be different when IIS runs under a different OS.
>
>Save this code as "identity.aspx" and run it in IIS :
>
><%@ Page Language="VB" %>
><html>
><head>
></head>
><body>
><%
>Response.Write("ASP.NET is running as the account : " & Environment.Username)
>%>
></body>
></html>
>
>Running that file will tell you which account needs read/write
>permissions when you run your Avatar app under IIS.
>
>
>
>
>Juan T. Llibre, asp.net MVP
>¿ Estas probando VS 2010 y ASP.NET 4.0 ?
>Regístrate (gratis) en los Foros de VS 2010 y ASP.NET 4.0, en español
>http://asp.net.do/foros/forums/
>=====================================================
>"David Thielen" <thielen@nospam.nospam> wrote in message news:e32e251gqc5h3rnhsn4e1qmlbjqjkte7ql@4ax.com...
>> Hi;
>>
>> I create avitars in a program Avitar.cs. Works great in VS 2008, not
>> in IIS. In IIS https://www.windwardreports.com/apps/avitar-6097.png
>> returns an error 404
>>
>> In VS2008 http://localhost:2716/store/avitar-6097.png works fine.
>>
>> In VS 2008 I have:
>> <httpHandlers>
>> <add verb="*" path="avitar-*.*" type="Avitar"/>
>> </httpHandlers>
>>
>> In IIS I have tried both
>> <httpHandlers>
>> <add verb="*" path="avitar-*.*" type="Avitar"/>
>> </httpHandlers>
>>
>> and
>> <httpHandlers>
>> <add verb="*" path="apps/avitar-*.*" type="Avitar"/>
>> </httpHandlers>
>>
>> But neither works. I know it's something simple but I can't figure it
>> out.
>>
>> help - thanks - dave
>>
>>
>> david@at-at***@windward.dot.dot.net
>> Windward Reports -- http://www.WindwardReports.com
>> me -- http://dave.thielen.com
>>
>> Cubicle Wars - http://www.windwardreports.com/film.htm
>
>


david@at-at***@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Bookmark and Share