Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Webresource.axd problem in asp.net 2.0

9 views
Skip to first unread message

awyl

unread,
Dec 29, 2005, 5:06:02 PM12/29/05
to
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!!!

Jim Cheshire

unread,
Dec 29, 2005, 5:21:34 PM12/29/05
to
awyl wrote:
>
> 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.

awyl

unread,
Dec 30, 2005, 11:23:03 AM12/30/05
to
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.

awyl

unread,
Dec 30, 2005, 12:18:03 PM12/30/05
to
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.

Davis@discussions.microsoft.com Lance Davis

unread,
Jan 3, 2006, 5:42:02 PM1/3/06
to
I am receiving the same error on my production server, but not on my
development machine. Were there any solutions posted to this problem?

Lance Davis

unread,
Jan 4, 2006, 10:09:03 AM1/4/06
to
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.

awyl

unread,
Jan 5, 2006, 1:10:04 PM1/5/06
to
I tried your solution. However the problem still exists after I created a
blank file with the name "WebResource.axd" in the webroot.

Jim Cheshire

unread,
Jan 5, 2006, 7:36:20 PM1/5/06
to
awyl wrote:
> 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.

0 new messages