I have several .aspx Web sites created with Visual Studio 2010. I recently updated them from .net3.5 framework to .net4.0. I installed NuGet Package Manager to install the app_browsersUpdate package so the sites would work properly in IE10. Web sites connect to various internal SQL databases.
Since the update (I believe, alas it could be some other cause), I am unable to use new references to Formview controls in code behind. (I use VB). For example, I have a Web page containing Formview1. In the code behind page, in the dropdown at the top of the page, there lists General, the the name of the Web page, then Page Events. There is no longer any reference to Formview1 (or any other controls I added, like Gridviews). This is universal to all Web sites I open in Visual Studio 2010. If I manually add the Sub with, for example, FormView1_ItemUpdated, it causes an error at run time.
I also have a copy of Visual Studio Express 2013 for Web that I can use. The Web pages work fine in that version. I can see and reference Formview1, etc, without issue. What happened to Visual Studio 2010?
I haven't resolved the issue, but do have additional info. I found some of my Web sites work fine. The difference in the problem sites seems to be an error in the aspx page line, starting with <%# Page Title = ...
On the problem page, the Page line is underlined with the following error: C:\mylocalpath\page.aspx: ASP.NET runtime error: The pre-application start initialization method preApplicationStart on type Microsoft.VisualStudio.WebPageInspector.Runtime.Loader.RuntimeLoader threw an exception with the following error message: Could not load file or assembly 'Microsoft.VisualStudio.Web.PageInspector.Runtime, Version=14.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7fl1d50a3a' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A).
So far researching that error has not given me a clear path to fix. I will update if I find an answer. The structure of that line is the same as the Web sites that are working normally.
Finally figured it out. In the problem Web sites, I have a line in the web.config file for a local domain account. . I added that account as a local admin account on the PC I was using Visual Studio on. Once I added that account, all back to normal.
Related
I want to publish to IIS the source code of my website (visual studio 2017 web forms website in vb.net or c#) without pre-compiling the project, so I can modify the source code directly on the server with IIS.
I know this is possible, I have done it in the past, and I have seen it done even now, but I cannot figure out what I need to do for this.
When I copy all the website source code to the server with the IIS, the website does not run... any ideas? or where to look for an answer? Is it a matter of setup? of the type of project?
When I call the website I get the following error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The CodeDom provider type
"Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider,
Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be
located.
Source Error:
An application error occurred on the server. The current custom error
settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could,
however, be viewed by browsers running on the local server machine.
Thanks!
#Gabe Thanks for the directions:
File - New Project, I see it under Visual Basic/Visual C# - Web - Previous Versions (ASP.NET Web Forms Site)
I tried it, and it works just fine! Basically if you create a project like you describe, you can just copy the source code in a server, without even installing visual studio there, and you can develop the site directly there.
This is ideal when you want to test things directly with external users, test things directly on the live or test servers, and of course you can make sure you have the source code of the project running, without having to keep both the source code and the compiled version.
There are a few drawbacks though:
1) you disrupt the website when you change things, and the application pool is restarted whenever there are changes, users in sessions are kicked out, etc...
2) there is a small delay while the site gets recompiled
3) there are cases where if while the code gets recompiled there are users online, there is asp.net corruption
Thanks for the replies!!
Regards
Manos
I need help re-creating a web solution file (at least I think that is what I need). I inherited a web application from another developer that left our company. It was created in Visual Studio 2010 and uses ASP.Net 2.0. There was no solution file, so I created a web application project and manually added all folders and files into my new solution. I did not make any changes to any file in the web application.
When I run the app from within Visual Studio, it starts up to the default page fine, but when I click a link on that same page, I get:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could
have been removed, had its name changed, or is temporarily unavailable. Please review the
following URL and make sure that it is spelled correctly.
Requested URL: /SomeCompany/startProject.aspx
Version Information: Microsoft .NET Framework Version:2.0.50727.8009; ASP.NET Version:2.0.50727.8008
My original start location: http://mylocalurl:65212/default.aspx
Link on the default page: http://mylocalurl:65212/SomeCompany/startProject.aspx
If, after clicking the link and getting the error page, I can remove "/SomeCompany/", and successfully get to the page. But I've seen the previous developer run it in Visual Studio and click the exact same link with no problem.
I need it to have the /SomeCompany/ in the url and work just like the previous developer had it so I can maintain and debug it as needed. What am I doing wrong in re-creating the solution...or is it another setup problem that I am not thinking of?
You could have probably just used file -> open web site. It probably is not a Web Application. Visual Studio has multiple types of web projects. Visual Studio will create a solution for you that you can save after you open the website.
Web Application Projects versus Web Site Projects in Visual Studio
I have a C#.NET project and am having a problem with a single web forms, ASPX page when debugging my application. Most of my application works fine, but when I hit a particular page, I get an Error 404, resource not found. I don't understand this because the file does exist, and it exists in the path that is being referenced. And, I hit several other ASPX pages on the way to this one, without error.
Now, I should mention that this particular page was only recently added to the project. My coworker, who added the page, says he was able to get the page to work, but we have different environments. So, I'm sure that has something to do with it, but I don't know what. Below are the known details regarding the differences between our environments.
My environment
Windows 8.1
IIS Express
Visual Studio 2013
Co-workers environment
Windows 7
IIS 7
Visual Studio 2012
We are both running with the same source code, as well as the same site and application pool settings in IIS, which are pointed to run time 4.0 and in classic mode.
Does anyone here have any idea why this would happen, or what I might try to get past this?
I ended up fixing this by switching to local iis and enabling the Static Content option in Windows Features.
I'm creating an installer for an ASP.NET app, and everything seems to work fine until I run the setup file, it creates all the folders and all the IIS stuff, BUT I keep getting a parse error from the asp page when I try to load it. The page itself is fine, because if I Copy-Paste-Replace the folder that contains the web page with the one Visual Studio generates (the sourse folder from wich installshield is getting the page to put into the installer) I no longer get the parser error (even though the code line it aparently can't read is still there). So I'm gessing that installshield is doing something to my page :S
Has anyone dealt with this before?
Thanks!
Yes, I've done this many times. What is the parser error? Does it say that the page is not precompiled?
I have installed the Visual Studio 2008 sp1 Report Viewer Redistributable on the web server. I had to download it from microsoft, because the location I've seen other people post does not exist on my install of visual studio. I downloaded the one that is located here: http://www.microsoft.com/downloads/details.aspx?familyid=BB196D5D-76C2-4A0E-9458-267D22B6AAC6&displaylang=en.
I think the location people say ReportViewer.exe is in, is usualy: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\ReportViewer\ReportViewer.exe. I have Visual Studio Team Suite Development Edition 2008 and the v2.0 directory under SDK does not exist. That may be some of my problem, I do not think so though.
I say all that to say that I can design the Microsoft Report, and I can run the page with the report viewer locally just fine. It seems to work really great, and could help out the company quite a bit.
However when I deploy to the webserver the page that host the reportviewer control will allways either say "This page does not have a precompiled..", or something like that. It usualy doesn't say anything and just sits there trying to load.
Other pages in the same website do not exhibit these symptoms. I have also successfully gotten crystal reports to display it's viewer, by installing the redistributable on the web server.
There must be something going on with one of our web servers. I finally got the report to load and it came up with an error message that said the same thing that this forum post talks about http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/b237dbab-7670-4c7a-b9af-70c5be7101d9.
I was then able to check the box that says allow precompiled site to be updatable. That fixed my issue. I now have both crystal and microsoft reports working correctly. Maybe this post will help someone else.
edit 2/18/2010 8:18am cst I thought it was fixed apparently not, as soon as I published to the web server again, the page will not load anymore. I am going to try and setup a completely new server in a virtual machine, to try and do more testing.
edit 2/19/2010 8:17am cst I spent alot of yesterday setting up a brand new virtual machine with server 2003, visual studio 2008, and sql 2005. I ran the same report page, all it has on it is the report viewer control. It still will not load. I figure there is something you have to do with IIS configuration to get it to work, since it won't load with default settings.
edit 2/19/2010 9:47am cst I have created a new web application with only the report in it, brand new web.config file. Something about my web.config file is causing the problem. This new web application is apparently working. I am now going to try and see if any new pages can be added to the previous web app at all. Maybe something is causing all new pages to not load.
edit 2/19/2010 10:12am cst Bizarrely the report sometimes loads. This happens on both the test environment, and the production environment. I did find a somewhat funny angry bug report to microsoft that explains the problem with the rdlc files compiling. That is what produces the following error:
**
An error occurred during local report processing.
The definition of the report 'Main Report' is invalid.
The report definition is not valid. Details: Data at the root level is invalid. Line 1, position 1.
**
The Bug report url: http://connect.microsoft.com/VisualStudio/feedback/details/468068/rdlc-files-are-build-into-resources-during-publish-this-is-a-marker-file
The blog post url that fixes it: http://weblogs.asp.net/stephensonger/archive/2008/09/10/deploying-rdlc-files-in-local-mode-for-asp-net-applications.aspx
As you can tell, possibly you don't find it funny, but there is a bug that causes rdlc files to compile for some reason. You can also fix it by having your site be updatable, which is one of the check boxes you can check when you publish in visual studio.
edit 2/19/2010 10:51am cst My next step is to snapshot the current virtual machine, go back to the point I installed sql 2005. At that point I'll install visual studio 2010 rc and see if it exhibits the same problem.
edit 3/3/2010 9:15am cst I don't know what fixed it, but both crystal and microsoft reports have been displaying correctly for awhile now. I made no changes other than what I have mentioned here.