473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to Get WebResources.axd working on IIS on XP Pro

I'm trying to figure out what I need to do to configure IIS 5.1 on XP Pro to
work when referencing WebResources.axd.

For example, I have an aspx script that works fine when run from Visual Web
Developer 2005 (Express Edition) built-in web server, but fails when run
under IIS (same file, same location).

I think I've tracked the problem to a failure of IIS to find
WebResources.axd. For example, if I point IE to the src centerated by the
Visual Web Developer server:

localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500

it returns the proper javascript code.

However, I point IE to the source generated by IIS:

localhost/WebResource.axd?d=-n9cHn2it-BTUPcvYkgh0g2&t=632744679945312500

I get a file not found error.

What do I need to do to configure IIS to properly work with WebResources.axd?

Any suggestions would be greatly appreciated.

Some comments on installation:

ASP.Net 2.0 was installed on XP via Windows Update

I checked web.config and it has the following line (I'm changing angle
brackets to square brackets for this post to prevent display problems):

[add path="WebResource.axd" verb="GET"
type="System.Web.Handlers.AssemblyResourceLoader" validate="True" /]

In IIS under application configuration mappings, there was no entry for .axd
I tried adding the following to see if it would help, but it didn't (I got
the same file not found problem I had when this entry wasn't there):

.axd c:\windows\microsoft.net\framework\v2.0.50727\aspn et_isapi.dll
Limit to: GET,HEAD,POST,TRACE
Script Engine; Check if file exists

One work-around I've managed is to point my Visual Web Developer server to

localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500

get the javascript code, save it as a physical file WebResource.axd so that
when my .aspx script runs on IIS it's code will access the physical file and
run correctly, however, I know this is not a "good" way to make things work :)

Any suggestions as to how I can get my IIS configured properly so that it
returns the WebResource.axd file would be greatly appreciated.

Thanks.

Mar 3 '06 #1
3 13924
re:
What do I need to do to configure IIS to properly work with WebResources.axd?
You don't need to do anything, unless you have very specific needs.

WebResource.axd will be populated automatically
with whatever script resources your objects need.

WebForms.js is an embedded resource inside System.Web.dll,
and it is served using the new WebResource.axd handler.

WebResource.axd is a built-in HTTP handler in ASP.NET 2.0
that's used to retrieve script code into pages.

It doesn't need to be used directly, although it can be.

This handler guarantees that all the script code necessary to perform
the callback is correctly referenced within the page or control.

In particular, WebResource.axd ensures that calls to WebForm_DoCallback
and WebForm_InitCallback are successfully resolved.

If you want to take a look at the real source code behind script callbacks
in ASP.NET 2.0, open the Temporary Internet Files folder on your Web
server machine and look up the file WebResource.axd.

There will be several there.

The code injected through this HTTP handler represents the
callback manager in charge of sending the request and handling the results.

See http://msdn.microsoft.com/msdnmag/is...8/CuttingEdge/
for a code example.

Also, check out Peter Bromberg's article at :
http://www.eggheadcafe.com/articles/20050528.asp

Rick Strahl shows you how to embed your own resources for use with WebResources.axd :
http://west-wind.com/weblog/archive/01302006.aspx

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"RobertS" <Ro*****@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com... I'm trying to figure out what I need to do to configure IIS 5.1 on XP Pro to
work when referencing WebResources.axd.

For example, I have an aspx script that works fine when run from Visual Web
Developer 2005 (Express Edition) built-in web server, but fails when run
under IIS (same file, same location).

I think I've tracked the problem to a failure of IIS to find
WebResources.axd. For example, if I point IE to the src centerated by the
Visual Web Developer server:

localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500

it returns the proper javascript code.

However, I point IE to the source generated by IIS:

localhost/WebResource.axd?d=-n9cHn2it-BTUPcvYkgh0g2&t=632744679945312500

I get a file not found error.

What do I need to do to configure IIS to properly work with WebResources.axd?

Any suggestions would be greatly appreciated.

Some comments on installation:

ASP.Net 2.0 was installed on XP via Windows Update

I checked web.config and it has the following line (I'm changing angle
brackets to square brackets for this post to prevent display problems):

[add path="WebResource.axd" verb="GET"
type="System.Web.Handlers.AssemblyResourceLoader" validate="True" /]

In IIS under application configuration mappings, there was no entry for .axd
I tried adding the following to see if it would help, but it didn't (I got
the same file not found problem I had when this entry wasn't there):

.axd c:\windows\microsoft.net\framework\v2.0.50727\aspn et_isapi.dll
Limit to: GET,HEAD,POST,TRACE
Script Engine; Check if file exists

One work-around I've managed is to point my Visual Web Developer server to

localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500

get the javascript code, save it as a physical file WebResource.axd so that
when my .aspx script runs on IIS it's code will access the physical file and
run correctly, however, I know this is not a "good" way to make things work :)

Any suggestions as to how I can get my IIS configured properly so that it
returns the WebResource.axd file would be greatly appreciated.

Thanks.

Mar 3 '06 #2
Many thanks for the response, but let me try to clarify the problem. The
problem I'm trying to solve is that the WesResouce.axd is not being access
automatically when my aspx script is run in IIS (it is in Visual Web
Developer).

You are correct that the code to access WebResources.axd is being properly
generated, I can see this by viewing the source in IE:

When run via IIS:

[script
src="/WebResource.axd?d=-n9cHn2it-BTUPcvYkgh0g2&t=632744679945312500"
type="text/javascript"][/script]

When run via Visual Web Developer built-in server:

[script
src="localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500" type="text/javascript"][/script]

The problem is, when running under IIS, IIS returns a message that
WebResource.axd cannot be found and so no javascript code is returned to IE
and so the page fails to work.

When run under Visual Web Developer built-in serever, WebResource.axd is
found and the javascript is returned so the page works.

Somehow I suspect that IIS is not properly seeing the

[add path="WebResource.axd" verb="GET"
type="System.Web.Handlers.AssemblyResourceLoader" validate="True" /]

line in web.config or that System.Web.Handlers.AssemblyResouceLoader is for
some reason not working in IIS since if I take the javascript code that is
returned from WebResource.axd when run under Visual Web Developer built-in
server and save it as a real file called WebResource.axd and then use IIS,
IIS will read the saved WebResource.axd file and work properly. This would
seem to me to indicate that

[add path="WebResource.axd" verb="GET"
type="System.Web.Handlers.AssemblyResourceLoader" validate="True" /]

is not working properly in IIS, since IIS appears not to be using
System.Web.Handlers.AssemblyResourceLoader when WebResources.axd is
referenced, but instead is still looking for a real file named
WebResources.axd.

Any suggestions or further clues on how to solve the problem would be
appreciated.

Many Thanks.


"Juan T. Llibre" wrote:
re:
What do I need to do to configure IIS to properly work with WebResources.axd?


You don't need to do anything, unless you have very specific needs.

WebResource.axd will be populated automatically
with whatever script resources your objects need.

WebForms.js is an embedded resource inside System.Web.dll,
and it is served using the new WebResource.axd handler.

WebResource.axd is a built-in HTTP handler in ASP.NET 2.0
that's used to retrieve script code into pages.

It doesn't need to be used directly, although it can be.

This handler guarantees that all the script code necessary to perform
the callback is correctly referenced within the page or control.

In particular, WebResource.axd ensures that calls to WebForm_DoCallback
and WebForm_InitCallback are successfully resolved.

If you want to take a look at the real source code behind script callbacks
in ASP.NET 2.0, open the Temporary Internet Files folder on your Web
server machine and look up the file WebResource.axd.

There will be several there.

The code injected through this HTTP handler represents the
callback manager in charge of sending the request and handling the results.

See http://msdn.microsoft.com/msdnmag/is...8/CuttingEdge/
for a code example.

Also, check out Peter Bromberg's article at :
http://www.eggheadcafe.com/articles/20050528.asp

Rick Strahl shows you how to embed your own resources for use with WebResources.axd :
http://west-wind.com/weblog/archive/01302006.aspx

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"RobertS" <Ro*****@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
I'm trying to figure out what I need to do to configure IIS 5.1 on XP Pro to
work when referencing WebResources.axd.

For example, I have an aspx script that works fine when run from Visual Web
Developer 2005 (Express Edition) built-in web server, but fails when run
under IIS (same file, same location).

I think I've tracked the problem to a failure of IIS to find
WebResources.axd. For example, if I point IE to the src centerated by the
Visual Web Developer server:

localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500

it returns the proper javascript code.

However, I point IE to the source generated by IIS:

localhost/WebResource.axd?d=-n9cHn2it-BTUPcvYkgh0g2&t=632744679945312500

I get a file not found error.

What do I need to do to configure IIS to properly work with WebResources.axd?

Any suggestions would be greatly appreciated.

Some comments on installation:

ASP.Net 2.0 was installed on XP via Windows Update

I checked web.config and it has the following line (I'm changing angle
brackets to square brackets for this post to prevent display problems):

[add path="WebResource.axd" verb="GET"
type="System.Web.Handlers.AssemblyResourceLoader" validate="True" /]

In IIS under application configuration mappings, there was no entry for .axd
I tried adding the following to see if it would help, but it didn't (I got
the same file not found problem I had when this entry wasn't there):

.axd c:\windows\microsoft.net\framework\v2.0.50727\aspn et_isapi.dll
Limit to: GET,HEAD,POST,TRACE
Script Engine; Check if file exists

One work-around I've managed is to point my Visual Web Developer server to

localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500

get the javascript code, save it as a physical file WebResource.axd so that
when my .aspx script runs on IIS it's code will access the physical file and
run correctly, however, I know this is not a "good" way to make things work :)

Any suggestions as to how I can get my IIS configured properly so that it
returns the WebResource.axd file would be greatly appreciated.

Thanks.


Mar 3 '06 #3
OK, problem found and solved:

When ASP.Net 2.0 was installed (via Windows Update), it did not put and
entry for the .axd file type in IIS under directory, configuration, mappings.

Actually I had discovered this days ago and put in the entry by duplicating
the entry for .aspx -- that didn't work so I went off on another long
debugging tangent with the web.config file, which eventually led me back to
the IIS entry for .axd -- the critical problem was the "Check that file
exists" box must not be checked (obviously -- once I think about it).

Anyway once the entry:

..axd

c:\windows\microsoft.net\framework\v2.0.50727\aspn et_isapi.dll

limit to: GET, HEAD, POST, TRACE

Script Engine

was added to the IIS configuration, everything started to work.

"RobertS" wrote:
I'm trying to figure out what I need to do to configure IIS 5.1 on XP Pro to
work when referencing WebResources.axd.

For example, I have an aspx script that works fine when run from Visual Web
Developer 2005 (Express Edition) built-in web server, but fails when run
under IIS (same file, same location).

I think I've tracked the problem to a failure of IIS to find
WebResources.axd. For example, if I point IE to the src centerated by the
Visual Web Developer server:

localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500

it returns the proper javascript code.

However, I point IE to the source generated by IIS:

localhost/WebResource.axd?d=-n9cHn2it-BTUPcvYkgh0g2&t=632744679945312500

I get a file not found error.

What do I need to do to configure IIS to properly work with WebResources.axd?

Any suggestions would be greatly appreciated.

Some comments on installation:

ASP.Net 2.0 was installed on XP via Windows Update

I checked web.config and it has the following line (I'm changing angle
brackets to square brackets for this post to prevent display problems):

[add path="WebResource.axd" verb="GET"
type="System.Web.Handlers.AssemblyResourceLoader" validate="True" /]

In IIS under application configuration mappings, there was no entry for .axd
I tried adding the following to see if it would help, but it didn't (I got
the same file not found problem I had when this entry wasn't there):

.axd c:\windows\microsoft.net\framework\v2.0.50727\aspn et_isapi.dll
Limit to: GET,HEAD,POST,TRACE
Script Engine; Check if file exists

One work-around I've managed is to point my Visual Web Developer server to

localhost:2317/WebResource.axd?d=sbmgIrZc4GkisHONnrRdTA2&t=632744 679945312500

get the javascript code, save it as a physical file WebResource.axd so that
when my .aspx script runs on IIS it's code will access the physical file and
run correctly, however, I know this is not a "good" way to make things work :)

Any suggestions as to how I can get my IIS configured properly so that it
returns the WebResource.axd file would be greatly appreciated.

Thanks.

Mar 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gary | last post by:
I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)"); This is not working ..what could be the...
5
by: Martin Heuckeroth | last post by:
Hi We are working on a webservice application and are having some problems with the cookies and/or sessions. We have them working on our intranet but then its not working on the internet. We...
5
by: tshad | last post by:
I have been working with setting my drop boxes to allow double clicking to select an item. It worked fine until I made some changes. I then stripped the page down to the bare essentials to find...
8
by: jojobar | last post by:
Okay, I am trying to do is to test the webresource in 2.0 1. I created a new project with assembly name (and default assembly name) "Office". 2. I added the following to the AssemblyInfo.cs...
2
by: Don | last post by:
I'm having problems with intellisense, autocomplete, etc. suddenly not working in certain classes of a project I'm working on. All the options are set, and it all works fine for most classes, but...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
3
by: daokfella | last post by:
I cannot for the life of me get this to work! Everything looks like it's working (the axd path is in the page source), but when I copy it into the address bar I get a blank page and not the...
2
by: matt_randle | last post by:
Can anyone tell me why this is not working ? I have an aspx page with the following definition, <asp:ImageButton ID="MenuBtnOpen" ImageUrl='<%#...
0
by: macap.usenet | last post by:
Hello, i am embedding System.Web.UI.WebResources in my C# Class via: I use this resource with: Page.Header.Controls.Add(new LiteralControl("<link href='"ExtJS.yui- ext.css"'...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.