Webresource.axd problem in asp.net 2.0

G

Guest

I tried to use validation in asp.net 2.0 with the following code.

<%@ Page Language="c#" %>
<html>
<body>
<form runat="server">
<asp:TextBox ID="abc" runat="server">
</asp:TextBox>
<asp:RequiredFieldValidator ControlToValidate="abc"
runat="server"></asp:RequiredFieldValidator>
<asp:LinkButton runat="server">click</asp:LinkButton>
</form>
</body>
</html>

I got the javascript error:
"Error: WebForm_DoPostBackWithOptions is not defined
Source File: javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("ctl02", "", true, "", "", false, true))"

Then I view source and found script tags loading external javascript files.

I tried to load it directly in the browser and it showed me this error.

URL
http://localhost/WebResource.axd?d=CRPh045yFpljm8l46VDATQ2&t=632664526791296187

ERROR:
System.Security.Cryptography.CryptographicException: Padding is invalid and
cannot be removed.

I googled but I cannot find an answer.

I would really appreciate if anyone could help. Thanks!!!
 
J

Jim Cheshire

awyl said:
ERROR:
System.Security.Cryptography.CryptographicException: Padding is
invalid and cannot be removed.

Is this on a web farm by any chance?

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry: Digging into Objects
Describes the details of digging into
memory usage with the debugger.
 
G

Guest

Nope, this is not on a web farm.

There is no compression enabled and the error appears on all the
workstations. OS is Windows XP.
 
G

Guest

The following is the error reported in Event Log.

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 12/29/2005 4:04:49 PM
Event time (UTC): 12/29/2005 9:04:49 PM
Event ID: f24380656ff348b084581c452563e1e9
Event sequence: 50
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT-1-127803636758088750
Trust level: Full
Application Virtual Path: /
Application Path: G:\NYCweb05\WEBROOT\
Machine name: NYC02

Process information:
Process ID: 3408
Process name: aspnet_wp.exe
Account name: NYC02\ASPNET

Exception information:
Exception type: CryptographicException
Exception message: Padding is invalid and cannot be removed.

Request information:
Request URL:
http://localhost/webresource.axd?d=crph045yfpljm8l46vdatq2&t=632664526791296187
Request path: /webresource.axd
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NYC02\ASPNET

Thread information:
Thread ID: 5
Thread account name: NYC02\ASPNET
Is impersonating: False
Stack trace: at
System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32
outputOffset, PaddingMode paddingMode, Boolean fLast)
at
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean
useValidationSymAlgo)
at System.Web.UI.Page.DecryptString(String s)
at
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)


Custom event details:

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
 
G

Guest

I am receiving the same error on my production server, but not on my
development machine. Were there any solutions posted to this problem?

awyl said:
The following is the error reported in Event Log.

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 12/29/2005 4:04:49 PM
Event time (UTC): 12/29/2005 9:04:49 PM
Event ID: f24380656ff348b084581c452563e1e9
Event sequence: 50
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT-1-127803636758088750
Trust level: Full
Application Virtual Path: /
Application Path: G:\NYCweb05\WEBROOT\
Machine name: NYC02

Process information:
Process ID: 3408
Process name: aspnet_wp.exe
Account name: NYC02\ASPNET

Exception information:
Exception type: CryptographicException
Exception message: Padding is invalid and cannot be removed.

Request information:
Request URL:
http://localhost/webresource.axd?d=crph045yfpljm8l46vdatq2&t=632664526791296187
Request path: /webresource.axd
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NYC02\ASPNET

Thread information:
Thread ID: 5
Thread account name: NYC02\ASPNET
Is impersonating: False
Stack trace: at
System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32
outputOffset, PaddingMode paddingMode, Boolean fLast)
at
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean
useValidationSymAlgo)
at System.Web.UI.Page.DecryptString(String s)
at
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)


Custom event details:

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.


awyl said:
I tried to use validation in asp.net 2.0 with the following code.

<%@ Page Language="c#" %>
<html>
<body>
<form runat="server">
<asp:TextBox ID="abc" runat="server">
</asp:TextBox>
<asp:RequiredFieldValidator ControlToValidate="abc"
runat="server"></asp:RequiredFieldValidator>
<asp:LinkButton runat="server">click</asp:LinkButton>
</form>
</body>
</html>

I got the javascript error:
"Error: WebForm_DoPostBackWithOptions is not defined
Source File: javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("ctl02", "", true, "", "", false, true))"

Then I view source and found script tags loading external javascript files.

I tried to load it directly in the browser and it showed me this error.

URL:
http://localhost/WebResource.axd?d=CRPh045yFpljm8l46VDATQ2&t=632664526791296187

ERROR:
System.Security.Cryptography.CryptographicException: Padding is invalid and
cannot be removed.

I googled but I cannot find an answer.

I would really appreciate if anyone could help. Thanks!!!
 
G

Guest

Update: I was able to solve my own problem. I am using a third party
product on my Web Server called SecureIIS (by eeye.com). When I went into
SecureIIS and disabled the security for the website in question, my
JavaScript / WebResource.axd - 404 error went away, re-securing the site
brought the error back. Feeling that my SecureIIS program was unhappy with
the fact that the WebResource.axd file didn't physically exist in the root
folder, I went ahead and created a blank text file and named it
"WebResource.axd". No more errors.

Hope this might help someone.

Lance Davis said:
I am receiving the same error on my production server, but not on my
development machine. Were there any solutions posted to this problem?

awyl said:
The following is the error reported in Event Log.

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 12/29/2005 4:04:49 PM
Event time (UTC): 12/29/2005 9:04:49 PM
Event ID: f24380656ff348b084581c452563e1e9
Event sequence: 50
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT-1-127803636758088750
Trust level: Full
Application Virtual Path: /
Application Path: G:\NYCweb05\WEBROOT\
Machine name: NYC02

Process information:
Process ID: 3408
Process name: aspnet_wp.exe
Account name: NYC02\ASPNET

Exception information:
Exception type: CryptographicException
Exception message: Padding is invalid and cannot be removed.

Request information:
Request URL:
http://localhost/webresource.axd?d=crph045yfpljm8l46vdatq2&t=632664526791296187
Request path: /webresource.axd
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NYC02\ASPNET

Thread information:
Thread ID: 5
Thread account name: NYC02\ASPNET
Is impersonating: False
Stack trace: at
System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32
outputOffset, PaddingMode paddingMode, Boolean fLast)
at
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean
useValidationSymAlgo)
at System.Web.UI.Page.DecryptString(String s)
at
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)


Custom event details:

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.


awyl said:
I tried to use validation in asp.net 2.0 with the following code.

<%@ Page Language="c#" %>
<html>
<body>
<form runat="server">
<asp:TextBox ID="abc" runat="server">
</asp:TextBox>
<asp:RequiredFieldValidator ControlToValidate="abc"
runat="server"></asp:RequiredFieldValidator>
<asp:LinkButton runat="server">click</asp:LinkButton>
</form>
</body>
</html>

I got the javascript error:
"Error: WebForm_DoPostBackWithOptions is not defined
Source File: javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("ctl02", "", true, "", "", false, true))"

Then I view source and found script tags loading external javascript files.

I tried to load it directly in the browser and it showed me this error.

URL:
http://localhost/WebResource.axd?d=CRPh045yFpljm8l46VDATQ2&t=632664526791296187

ERROR:
System.Security.Cryptography.CryptographicException: Padding is invalid and
cannot be removed.

I googled but I cannot find an answer.

I would really appreciate if anyone could help. Thanks!!!
 
G

Guest

I tried your solution. However the problem still exists after I created a
blank file with the name "WebResource.axd" in the webroot.

Lance Davis said:
Update: I was able to solve my own problem. I am using a third party
product on my Web Server called SecureIIS (by eeye.com). When I went into
SecureIIS and disabled the security for the website in question, my
JavaScript / WebResource.axd - 404 error went away, re-securing the site
brought the error back. Feeling that my SecureIIS program was unhappy with
the fact that the WebResource.axd file didn't physically exist in the root
folder, I went ahead and created a blank text file and named it
"WebResource.axd". No more errors.

Hope this might help someone.

Lance Davis said:
I am receiving the same error on my production server, but not on my
development machine. Were there any solutions posted to this problem?

awyl said:
The following is the error reported in Event Log.

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 12/29/2005 4:04:49 PM
Event time (UTC): 12/29/2005 9:04:49 PM
Event ID: f24380656ff348b084581c452563e1e9
Event sequence: 50
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT-1-127803636758088750
Trust level: Full
Application Virtual Path: /
Application Path: G:\NYCweb05\WEBROOT\
Machine name: NYC02

Process information:
Process ID: 3408
Process name: aspnet_wp.exe
Account name: NYC02\ASPNET

Exception information:
Exception type: CryptographicException
Exception message: Padding is invalid and cannot be removed.

Request information:
Request URL:
http://localhost/webresource.axd?d=crph045yfpljm8l46vdatq2&t=632664526791296187
Request path: /webresource.axd
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NYC02\ASPNET

Thread information:
Thread ID: 5
Thread account name: NYC02\ASPNET
Is impersonating: False
Stack trace: at
System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32
outputOffset, PaddingMode paddingMode, Boolean fLast)
at
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean
useValidationSymAlgo)
at System.Web.UI.Page.DecryptString(String s)
at
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)


Custom event details:

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.


:

I tried to use validation in asp.net 2.0 with the following code.

<%@ Page Language="c#" %>
<html>
<body>
<form runat="server">
<asp:TextBox ID="abc" runat="server">
</asp:TextBox>
<asp:RequiredFieldValidator ControlToValidate="abc"
runat="server"></asp:RequiredFieldValidator>
<asp:LinkButton runat="server">click</asp:LinkButton>
</form>
</body>
</html>

I got the javascript error:
"Error: WebForm_DoPostBackWithOptions is not defined
Source File: javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions("ctl02", "", true, "", "", false, true))"

Then I view source and found script tags loading external javascript files.

I tried to load it directly in the browser and it showed me this error.

URL:
http://localhost/WebResource.axd?d=CRPh045yFpljm8l46VDATQ2&t=632664526791296187

ERROR:
System.Security.Cryptography.CryptographicException: Padding is invalid and
cannot be removed.

I googled but I cannot find an answer.

I would really appreciate if anyone could help. Thanks!!!
 
J

Jim Cheshire

awyl said:
I tried your solution. However the problem still exists after I
created a blank file with the name "WebResource.axd" in the webroot.

The WebResource.axd is a handler in 2.0 that serves specific client code. It
does not physically exist and you should not add it manually.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry:
Getting the PID and TID of a COM Call

Describes how to get the PID of the
dllhost process a COM call is executing
in and how to locate the thread as well.
 
Joined
Jan 23, 2008
Messages
2
Reaction score
0
Finally fixed the WebResource.axd 404 problem on my EPiServer site

I tried a lot of the different options for fixing this which you can find on-line.

The only thing that finally fix this problem for me, was to uncheck the "Verify that file exists" check box for the Wildcard entry I had under IIS Properties for the site>Home directory>Configuration...>"Edit" on the entries for the wildcard entries>Uncheck the check box.

To me it does not make sense that wildcard would overrule the specific entry that states that AXD files should be loaded as such.. (stated in the Application extensions section above) But it seems to do so anyway.

This saved my day that is for sure!

Good luck out there!

EPi_Boy
 
Joined
Jul 23, 2008
Messages
1
Reaction score
0
.axd configuration

I solved this by configuring the .axd extension in the application directory configuration

from the properties interface of the application:

configuration->Add

Executable = c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll

extension = .axd

choose the "limit to" radio button and add GET,HEAD,POST,DEBUG

uncheck the "Check that file exists" checkbox

Apply changes. That did it for me.
 
Joined
Aug 6, 2008
Messages
4
Reaction score
0
WebResource.AXD, "hacky fix"

this is a total hack for fixing this problem, but it worked for me.

Just create a file called WebResource.AXD in the root of the website with the following content:

function WebForm_PostBackOptions(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit) {
this.eventTarget = eventTarget;
this.eventArgument = eventArgument;
this.validation = validation;
this.validationGroup = validationGroup;
this.actionUrl = actionUrl;
this.trackFocus = trackFocus;
this.clientSubmit = clientSubmit;
}

.... etvc

you get the idea, just copy it from your local webresource.axd.
 
Joined
Jul 16, 2009
Messages
1
Reaction score
0
Wildcard Application Maps

Also check to see if you have any Wildcard Application Maps defined in the configuration.These also have a 'Verify that file exists' checkbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top