473,832 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Get WebResources.ax d 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.ax d.

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.ax d. For example, if I point IE to the src centerated by the
Visual Web Developer server:

localhost:2317/WebResource.axd ?d=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00

it returns the proper javascript code.

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

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

I get a file not found error.

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

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="WebResour ce.axd" verb="GET"
type="System.We b.Handlers.Asse mblyResourceLoa der" 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\micr osoft.net\frame work\v2.0.50727 \aspnet_isapi.d ll
Limit to: GET,HEAD,POST,T RACE
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=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00

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 13963
re:
What do I need to do to configure IIS to properly work with WebResources.ax d?
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_DoCallb ack
and WebForm_InitCal lback 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.ax d :
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*****@discus sions.microsoft .com> wrote in message
news:88******** *************** ***********@mic rosoft.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.ax d.

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.ax d. For example, if I point IE to the src centerated by the
Visual Web Developer server:

localhost:2317/WebResource.axd ?d=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00

it returns the proper javascript code.

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

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

I get a file not found error.

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

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="WebResour ce.axd" verb="GET"
type="System.We b.Handlers.Asse mblyResourceLoa der" 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\micr osoft.net\frame work\v2.0.50727 \aspnet_isapi.d ll
Limit to: GET,HEAD,POST,T RACE
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=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00

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.ax d 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 =63274467994531 2500"
type="text/javascript"][/script]

When run via Visual Web Developer built-in server:

[script
src="localhost: 2317/WebResource.axd ?d=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00" 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="WebResour ce.axd" verb="GET"
type="System.We b.Handlers.Asse mblyResourceLoa der" validate="True" /]

line in web.config or that System.Web.Hand lers.AssemblyRe souceLoader 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="WebResour ce.axd" verb="GET"
type="System.We b.Handlers.Asse mblyResourceLoa der" validate="True" /]

is not working properly in IIS, since IIS appears not to be using
System.Web.Hand lers.AssemblyRe sourceLoader when WebResources.ax d is
referenced, but instead is still looking for a real file named
WebResources.ax d.

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.ax d?


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_DoCallb ack
and WebForm_InitCal lback 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.ax d :
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*****@discus sions.microsoft .com> wrote in message
news:88******** *************** ***********@mic rosoft.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.ax d.

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.ax d. For example, if I point IE to the src centerated by the
Visual Web Developer server:

localhost:2317/WebResource.axd ?d=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00

it returns the proper javascript code.

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

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

I get a file not found error.

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

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="WebResour ce.axd" verb="GET"
type="System.We b.Handlers.Asse mblyResourceLoa der" 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\micr osoft.net\frame work\v2.0.50727 \aspnet_isapi.d ll
Limit to: GET,HEAD,POST,T RACE
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=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00

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\micr osoft.net\frame work\v2.0.50727 \aspnet_isapi.d ll

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.ax d.

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.ax d. For example, if I point IE to the src centerated by the
Visual Web Developer server:

localhost:2317/WebResource.axd ?d=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00

it returns the proper javascript code.

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

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

I get a file not found error.

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

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="WebResour ce.axd" verb="GET"
type="System.We b.Handlers.Asse mblyResourceLoa der" 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\micr osoft.net\frame work\v2.0.50727 \aspnet_isapi.d ll
Limit to: GET,HEAD,POST,T RACE
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=sbmgIrZc4Gki sHONnrRdTA2&t=6 327446799453125 00

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
6298
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 reason..? Situation: I have a menu in my form, which is given a short key "Ctrl+P", now when the
5
2814
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 have been looking our asses off but can not find a working solution. the code we came up with is ...
5
3067
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 out why it quit working. I found that if I didn't have a linkbutton, it quit working????????? If I changed the linkbutton to a regular button, it quit working. Here is the page:
8
2547
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 file (present under the Properties folder of the project) 3. Now I created a file called test.js on the root folder of the project,
2
14830
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 for some it just suddenly stopped working. After a build it'll work maybe once or twice, then stop. I've tried repairing my installation of Visual Studio 2003 but that didn't help. Is Microsoft working on a fix for this, or is there something...
9
3223
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. What it does is to call a webservice with two parameters, one being a integer, the other one being a "String" which contains XML (not the best practice, however that is the target interface and we cannot change that).
3
3274
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 javascript file I'm expecting. I've seen C# examples and I'm doing EXACTLY that same stuff in VB.Net, but can't get it working. Any help is appreciated. Jason
2
3680
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='<%# Page.ClientScript.GetWebResourceUrl(typeof(WebResources.Resource), "A.gif")%>' /> When the page is processed by asp.net, the src attribute for the image is always blank.
0
1394
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"' rel='stylesheet' type='text/css' />"));
0
9796
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10782
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10543
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10213
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9323
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.