Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > virtual file works in VS 2008, not IIS

Reply
Thread Tools

virtual file works in VS 2008, not IIS

 
 
David Thielen
Guest
Posts: n/a
 
      06-03-2009
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 Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
Reply With Quote
 
 
 
 
Allen Chen [MSFT]
Guest
Posts: n/a
 
      06-04-2009
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.ScriptHandlerFact ory,
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.ScriptHandlerFact ory,
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:
.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#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/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.




 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-04-2009
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" <> wrote in message news:...
> 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 Reports -- http://www.WindwardReports.com
> me -- http://dave.thielen.com
>
> Cubicle Wars - http://www.windwardreports.com/film.htm




 
Reply With Quote
 
David Thielen
Guest
Posts: n/a
 
      06-04-2009
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, (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.ScriptHandlerFact ory,
>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.ScriptHandlerFact ory,
>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:
>.
>
>================================================= =
>Get notification to my posts through email? Please refer to
>http://msdn.microsoft.com/en-us/subs...#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/subs.../aa948874.aspx
>================================================= =
>This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>



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

Cubicle Wars - http://www.windwardreports.com/film.htm
 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-04-2009
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/
================================================== ===
"David Thielen" <> wrote in message news:...
> 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, (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.ScriptHandlerFact ory,
>>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.ScriptHandlerFact ory,
>>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.ScriptResourceHandle r, 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:
>>.
>>
>>================================================ ==
>>Get notification to my posts through email? Please refer to
>>http://msdn.microsoft.com/en-us/subs...#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/subs.../aa948874.aspx
>>================================================ ==
>>This posting is provided "AS IS" with no warranties, and confers no rights.
>>
>>
>>

>
>
> david@at-at-
> Windward Reports -- http://www.WindwardReports.com
> me -- http://dave.thielen.com
>
> Cubicle Wars - http://www.windwardreports.com/film.htm




 
Reply With Quote
 
Allen Chen [MSFT]
Guest
Posts: n/a
 
      06-04-2009
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

 
Reply With Quote
 
David Thielen
Guest
Posts: n/a
 
      06-04-2009
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"
<> wrote:

>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" <> wrote in message news:...
>> 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 Reports -- http://www.WindwardReports.com
>> me -- http://dave.thielen.com
>>
>> Cubicle Wars - http://www.windwardreports.com/film.htm

>
>



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

Cubicle Wars - http://www.windwardreports.com/film.htm
 
Reply With Quote
 
Allen Chen [MSFT]
Guest
Posts: n/a
 
      06-10-2009
Hi Dave,

>thank you - will try tomorrow.


Have you solved this issue?

Regards,
Allen Chen
Microsoft Online Support

 
Reply With Quote
 
David Thielen
Guest
Posts: n/a
 
      06-15-2009


On Wed, 10 Jun 2009 05:59:23 GMT, (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 Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
Reply With Quote
 
David Thielen
Guest
Posts: n/a
 
      06-15-2009
Not yet - still trying different things.

thanks - dave


On Wed, 10 Jun 2009 05:59:23 GMT, (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 Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I turn on my PC, it works, works, works. Problem! Fogar Computer Information 1 01-17-2006 12:57 AM
After rebooting my PC works, works, works! Antivirus problem? Adriano Computer Information 1 12-15-2003 05:30 AM
ASP.NET application works in IIS PWS, but not in remote IIS. Matthew Louden ASP .Net 3 11-07-2003 09:58 PM
SQL Server connection string works with IIS 5.1 but not IIS 6 in ASP.NET John Kennedy ASP .Net Web Services 5 08-14-2003 12:15 AM
SQL Server connection string works with IIS 5.1 but not IIS 6 in ASP.NET John Kennedy ASP .Net Security 5 08-14-2003 12:15 AM



Advertisments