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!!!
 
Ad

Advertisements

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!!!
 
Ad

Advertisements

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!!!
 
Ad

Advertisements

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.
 

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

Top