Asp.net Microsoft ReportViewer using rdlc page never loads - asp.net

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.

Related

Formview options disappear in code behind Visual Studio 2010

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.

ASPX Page Not Found (Error 404), though it exists?

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.

Visual Studio 2010 displays IIS 7 page on debug instead of my project

This is my first ASP.NET project so I am a bit of a rookie when it comes to a lot of the configuring of IIS/Visual Studio so bear with me...
I am using Visual Studio 2010 running on Windows Server 2008 SR2. We recently did some updates on the server and now my project no longer loads when I attempt to debug. When I try to debug the default "Welcome" page for IIS 7 loads instead of my project. I am set up to use the development server to debug, not IIS so I don't understand why I get the IIS page. Before the updates the debugger was pulling up my page without any issues.
Any ideas? Thanks in advance!
It looks like IIS is now bound to the port number that Visual Studio Development Web Server was using previously. You can change the port number in the properties of the web site project.
I have found a solution to my issue. I decided to use IIS instead of the Development Server for debugging. After attempting to debug unsuccessfully yet again, I took a look at the identity that was being used in the application pool and I changed to one with more privileges and that seemed to do the trick. Thanks for the suggestions.
I had the same problem but non-of the earlier answers worked.
I am using Windows 7 enterprise 64-bit, IE11, VS2010, Silverlight 5
I have been developing and maintaining a number of Silverlight projects for the past 5 years, and have always been able to debug them within VS2010 using the ASP.NET Development Server. However, on returning from some well deserved holiday, I found that none of my existing Silverlight projects would run in the debugger. In each case there is a Web project set as the start-up project, and in each case on starting the project within VS2010 (with or without debugging) I got the IIS7 web page instead of my application.
I tried creating a new Silverlight web application, and found that this started normally in the ASP.NET Development Server. I checked my source code and found that no changes had been made in my absence.
After a lot of head scratching, etc., the solution was to clear the IE cache. These are the explicit steps I used:
Close all instances of IE and ASP.NET Development Server.
Open Internet Properties from the Control Panel.
Click "Delete" on the General Tab.
In the Delete Browsing History box check the following options:
a) "Preserve Favourites website data"
b) "Temporary Internet files and website data"
c) "Cookies and website data"
Leave the others unchecked
5) Click "Delete" and wait for the command to complete.
6) Close the Internet Properties box.
7) Rebuild ASP.NET project
8) Start (with or without debugging) in VS2010 - it should now load normally.
Hope this works for you.

Visual studio : when i checkout any file, session in my web application is lost

very strange that on checkout visual studio kills sessions, so when i checkout any file i have to log back in to my asp.net application again and again, its annoying :(
I have noticed above behaviour in visual studio 2010 and 2012, using it with VSS or Team Foundation Server. MSDN documentation Checkout does not have any details about such behaviour.
Wondering is it me ? or my code ? or its something Visual studio does?
anyone else is facing same problem ?
If Visual Studio detects a change in certain files, it will restart the web application if it's hosted on the internal development server (perhaps even IIS Express), which will in turn invalidate your user sessions. I'm not sure it works for every type of file, but I know it happens for me with the cshtml views since Visual Studio 2012. Obviously, like in IIS hosted web apps, a change to the web.config will cause a restart also.
Your best bet would be to externally host your site, meaning host it in IIS, not in the development server (Cassini). You can configure this in your Web Application's project properties.
There IS a workaround. I found it out by accident:
App_offline.htm created/deleted whenever I check out a file in TFS
The title is misleading; nevertheless it's all about the checkout process and the annoying session drop.
It does work for VS 2013 and VS 2015.
The answer above is so much difficult to access that it's worth creating an answer here. Thanks to the moderators for their understanding.

IIS error - this program cannot display the webpage.

Here are the details:
We have a dynamic data website using Telerik Open access, hosted through IIS 6. This application has been running fine with no issues in production. Recently, we added two new tables to the SQL database. These were added to the Telerik Open Access model and when tested in Visual Studio 2012 there was never any issues and ran brilliantly.
Then we published to production and when I browse to the application directly through IIS 6 to ensure it runs we get the error - "this program cannot display the webpage".
So we removed those two tables from the Telerik Open Access model and re-published and the Application runs great. So we re added the tables again and the same error comes from IIS.
This makes no sense as IIS normally gives an intelligible error. Why would IIS have an issue with two additional entities added to the Model but Visual Studio does not?
It looks like the model is somehow cached.
You could try restarting the IIS in order to avoid the issue with the new entities in your model.
We had a metadata file associated with the model, and it was not configured correctly. When we fixed it and re-deployed, it worked great. The strange thing is that Visual Studio ignored the error and it took publishing it to error on us. Strange.

Resources