Web Forms :: File Xyz Has Not Been Pre-compiled, And Cannot Be Requested
Jan 1, 2010
Using ASP.NET 3.5 / VS 2008.I have an app that has been deployed on 13 different servers at client sites with no issues. One of the modules is an aspx file that generates a crystal report.When I deployed the app to a Windows 2008 server-64 bit/ IIS 7, the aspx page that uses crystal reports errors out with the message:The file 'xyz.aspx' has not been pre-compiled, and cannot be requested. (All other aspx pages load just fine).
I ran into this error today and much googling didn't get me the answer. I have been for years now publishing this particular site by simply doing "Publish web site" and then supplying it a UNC path, then I go to the server delete the old bin and copy to the new bin folder to the live site, this has always worked except today I started getting the "cannot be requested" error for certian pages in certain directories. Everything else worked and after several attempts nothing else broke and only these same certain few pages where screwed up - there was nothing exciting about any of these pages, in fact they were part of the admin portion of the site and were very simple
Running Windows Server 2008 R2 (IIS 7.5). This is happening at a client's site and works fine on our internal servers with the same OS configuration. We are using the following work-around for now:Modify the Advanced Settings of the Application Pool that the site uses, and change the Identity used by the Process Model from ApplicationPoolIdentity to NetworkService
Complete newbie with asp.net using 2008 express edition.I made a master page and one simple page, and used the ftp copy web site tool to load the pages to my web site.When I try to open the one page, I get the message has not been pre-compiled, and cannot be requestedI havedone some searching on the error message, and most places talk about missing things from the Bin directory. I don't have a bin directory on my local machine.
.aspx file that I would have never even thought to look. It was occuring because of a control(ListView I believe) that had been "completely" commented out using the <!-- --> tags. The text was all green which gave me the re-assuring feeling that this code would not be included in the website. I finally decided to search my entire .aspx page for any occurences of the variable it kept insisting couldn't be "databound" and sure enough it was inside a template of a ListView control that was commented out.
my asp.net site uses resource files for a referenced project with the user controls in it.
so i have one website project, and one dll project with usercontrols + the resource files.
The website references the dll project.
So far so good.
When i publish, the dll with the usercontrols gets compiled in a dll (what else) but the resource files also get compiled (a separate dll for every language)
Is there a way to edit the resource strings in the dll once deployed?
After pre-compiled a ASP.NET web site, I got many files with the names like
App_Web_accountbalance.aspx.dfa151d5.dll
Do you know the rule for the random chars (in bold) above? Can we fix the random chars? The reason to fix it is that if we modify AccountBalance.aspx file later and re-compile the web site, can we just replace App_Web_accountbalance.aspx.dfa151d5.dll.
I was wondering how guys did you manage this in your company or website, to let owner of the website, to update content of the website, when it's resx file compiled.What would be the best option to do that without requiring a developer intervention
I have a web application and I'm using asp.net routing. When I publish it with the Only files needed to run this application selected it gives me an error when I'm loading any of the page "HTTP Error 404 - File or directory not found."
I'm looking to pick brains on the following.I have a page which contains numerous links to other websites.I use a redirect to get to the destination page so I can run any code prior to the redirect. What I would like to do is attempt the redirect, but then display an error message if it doesn't happen in say 20 seconds.I already have code to check a link so I can check, then if available redirect, however I would prefer to redirect and catch an error.
I have an asp.net application that I wrote that uses query parameters and I'd like to use routing to use a different URL. I'm missing something, though, after reading through numerous walkthroughs.URL that I'm now using with query parameters: http://mywebsite.com/app1/default.aspx?d=dept&c=category&p=page.htm I would like to use routing to have a URL of http://mywebsite.com/app1/dept/category/page.htm and have the same code behind work. Currently it doesn't work at all. Not sure what else I may have to do.
There is a pattern in ASP.NET - whenever there is a piece of markup that generates code (like the .aspx/.ascx files in WebForms or .cshtml files in MVC3), these files are dynamically compiled at runtime. aspnet_compiler will produce another assembly for them, which references your code-behind assembly. This approach seems awkward to me and I don't understand why it hasn't been discontinued already. A much better approach (in my opinion) is like in Winforms or resource files - you have your .whatever file, and then there is .whatever.desginer.cs file. This designer file is created at runtime as you type. When you compile, the compiler doesn't care about your .whatever file, it just takes the .whatever.designer.cs file and produces a single solid assembly. This provides several benefits:
You can inherit your forms from each other, similar to windows forms; You can always see the code that is being generated, possibly adjusting your markup to generate better code; You can easily instantiate strongly typed instances of your forms;
The only benefit I can see from dynamic compilation is that You can change the markup file anytime and don't need to recompile the app.To be honest, I've often wanted for one of the first three benefits, but never for the last one. Recompiling the app to see your changes isn't that big of a deal. Especially since you have to do it anyway when working with code-behind, where the most of your time will be. And when you deliver your app to the client, you deliver it as a monolithic, precompiled block. When you update, you update everything, not just individual .aspx files - there's no point to. why is it like this? What am I missing?
may i know how can i let people to edit my compiled aspx page?let said i have upload my web application to server, and i wanna let web designer download it and change content of my page by using dreamweaver. (like juz update address, add tel number)
Using Visual Studio 2005 to create a test ASPX Page using Visual Basic.Simply trying to open an existing file that exists on the particular directory where the ASPX files and the web.config file has been copied. If we run the ASPX page on the Local Host of the Development PC, it works just fine.However when the same page is uploaded to the GoDaddy Site using ASP 2.0, we are seeing the following error:
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 ystem.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3053 [code]...
I have a tricky situation. My application got deployed in production. A lable value needs to be changed but the problem is am setting the label value dyanamically from page load of my page. Is there way to change the label value withour redeploying? i can change the logic on codebehind but that requires another deployement which i don't want to do that as it is production.
In my asp.net and vb code web. there is some pages which require username and password to access it. when the user clicks on the link for this page it directs to the login page and if the username and password is correct then it is directed to default page and not to the page requested.
Code in my .vb page is as under
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Session("userid") = Nothing Then Response.Redirect("login.aspx") End If End Sub
Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Requested registry access is not allowed.
I am having a very hard time in consuming a very simple web user control that I have built using a Web Application project in VS 2010. The user control works fine as long as the consuming aspx page is in the same project. But after deploying the project using Web Deployment Project into a single assembly I am not able to use it correctly from another aspx page which is in a stand-alone project. The error I see is a null reference exception. Here are the steps that I am following:
1 Create a web user control named WebUserControl_Label using a web application project. This control works fine when used in an webform in the same project.
namespace TestWebAppWithCustomControl { public partial class WebUserControl_Label : System.Web.UI.UserControl { private string _labelText; public string LabelText { set { Label1.Text = value; } get { return Label1.Text; } } protected void Page_Load(object sender, EventArgs e) { } } }
2. Create a single assembly for the user control above using a Web Deployment project. The name of the assemby is TestWebAppWithCustomControl.
3. Create a webform in another web application project to use WebUserControl_Label user control. This project has TestWebAppWithCustomControl.dll added as a referemce.
This is how I am using the custom control above in an aspx page:
The problem is that .NET throws a Null Reference Exception when its trying to set the label text via the LabelText property. It looks like that the label control that lives inside the WebUserControl_Label user control is not getting instantiated and is always null.
I have found a few articles online that talk about creating such distributable user controls using ASP.NET website projects. But if possible I would like to stick with the web application project because of the benefits it brings.
Using ASP.Net, I am trying to determine the actual URL requested by the user. For example if I type the following into my address bar: [URL] Fiddler shows me that this is the URL being sent over the wire however by the time it reaches ASP.Net all of the variables in HttpContext.Current.Request are showing this URL: [URL] The IIS logs show the same cleaned up version of the URL as ASP.Net. This causes some of the relative links on the site to break so I would like to at least detect and log these requests. I am using IIS7 on Windows 7 and .Net 3.5 SP1. What is doing this translation and how can I find out the original URL?
As we're using urlrewiting in a Netscaler to forward all requests for the "/social" folder onto a seperate server farm containing this app, the "/" root path won't resolve correctly as it will be requesting the resource from the something.com app.
Therefore I need to change the url of the requested script to either request it explicitly:
Why we say compiled code in ASP.NET using C# or VB.NET means high performance and in the other side the server controls make the website slower! so if we combine server controls + compiled code the result will be the same as other interpreted technologies, so where is the speed and performance in ASP.NET? From this point of viwe it seems to be the same as others technologies, right?
We deployed a UserControl to our testing server. Then made a change to the UserControl and re-deployed. I cannot get the change to take. We have cycled the ASP.NET server, deleted the file completely and re-copied, and also tried a suggestion to change the web.config in order to force all files to be re-compiled.
I definitely know that we are changing the correct file. At one point, I removed the UserControl file altogether and received the "File not found error" when trying to load the user control. The file IS the correct version on the testing server.
[ASP.NET 4.0, Windows Server 2003 SP2, IIS (I think 6?)]