PDA

View Full Version : [CLOSED] Ext is not defined



Antonio09
Jul 23, 2012, 11:52 PM
Everything is fine, until I put an Ext.NET control into the logon page, the one that i have in the web.config tag:


<forms name=".ASPXAUTH" loginUrl="/LogOn.aspx" protection="All" path="/" timeout="30" />

When I do that i get a javascript error message saying: 'ext' is not defined. If i take off the LogOn.aspx page of the loginUrl tag it works perfect, whatever page that I put on that tag, if it has an Ext.NET control I get that error.

I need to use Ext.NET controls into my logon page, How can I get it done?

Thank you.

Daniil
Jul 24, 2012, 9:24 AM
Hi,

I am unable to reproduce adding also:

<authorization>
<deny users="?" />
</authorization>

I see that JavaScript resources requests are getting "302 found" status and the files, actually, look to be not loaded correctly.

Can you confirm you have the same on your side?

Daniil
Jul 24, 2012, 10:12 AM
Possible solutions:

1. Setting up

<ext:ResourceManager runat="server" CleanResourceUrl="false" />
in the LogOn.aspx.

It will prevent cleaning of the resources URLs.

2. Preventing authentication for the resources setting up the following in Global.asax.

protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
string url = HttpContext.Current.Request.FilePath;

if (url.EndsWith("ext.axd"))
{
HttpContext.Current.SkipAuthorization = true;
}
}

Antonio09
Jul 24, 2012, 4:00 PM
With the code in Application_AuthenticateRequest.

Thanks!