after publishing mvc web application to IIS 7.0, the problem was that the reports are not working, however, i did the following but it didn't worked :
Installed MICROSOFT® REPORT VIEWER 2012 RUNTIME package from http://www.microsoft.com/en-us/download/details.aspx?id=35747
After installation, found Microsoft.ReportViewer.WebForms.dll in
C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer
go to IIS Manager --> choose the Web Application which contains the reports, and then choose Handler Mappings
in Handler Mappings, Add a new Handler, Set its info as the following:
Request Path : Reserved.ReportViewerWebControl.axd
Type: Microsoft.Reporting.WebForms
Name: Reserved.ReportViewerWebControl.axd
Found the below handler got added automatically in web.config under
system webserver section in
<handlers>
<add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
I'm using Visual studio 2013, dot net framework 4.5
Please guide me to solve this issue. Thanks in advance.
Make sure all the files related to RDLC are there in the published files.
If it is not there copy and paste it from Project file
Copy .rdlc folder to bin folder in the project directory.
Deploy your project to the server again.
Hope it'll solve your issue.
Best-
I'm using a view in Oracle DB to produce the report. That view is not working properly. We just dropped and re-created the view and it is working fine. Thanks for all the responses.
Related
I changed my ASP.NET web application to use Local IIS, instead of IIS Express. Now after re-opening the solution, the following error occurs while loading the application:
error : Project 'Atlas2' could not be opened because the Visual C# 2015 compiler could not be created. 'Atlas2' is already part of the workspace.
error : Project 'Atlas2' could not be opened because the Visual C#
2015 compiler could not be created. An item with the same key has
already been added.
Would someone please help me how I can reload the project?
I'm using Visual Studio Team Services (was TFS Online), if it helps.
I solved my problem. I unloaded the project and edited .csproj file. I did the following changes:
<UseIISExpress>false</UseIISExpress> to true
Remove <UseIIS>True</UseIIS>
Remove <IISUrl>http://localhost/MyWebApp</IISUrl>
Then I reloaded the project. It worked. Actually it rolled back to use IIS Express.
The same problem occurred at my system and got solved by running The Visual Studio in administrator mode. The issue was IIS having the same host+port name as ASP.NET project and without administrator rights Visual Studio was not able add the website.
I had this error after switching from IIS Express to full IIS with Visual Studio 2015.
I was able to load the project when I ran Visual Studio as Administrator.
I was getting a similar error in VS 2015.
"could not be opened because the visual c# 2015 compiler could not be
created." "with the same key has already been added"
I was able to workaround the issue by opening the solution in Visual Studio 2013, Cleaning the solution, closing visual studio, then opening the same solution in Visual Studio 2015.
I also noticed that after doing this sequence of events, the csproj file of the project that was initially giving this error updated its ProjectExtensions element and set <UseIIS>False</UseIIS>
Image below of diff between csproj when error was occuring and after workaround.
Keep in mind that before I used this workaround, I tried to update that element manually and set to false, but that did not work.
The problem is the app has been configured to use local IIS instead of Express and their coud be two issues for which you are unable to load the app.
Issue 1. You don't have IIS installed in your local system, In this case you have to install IIS or have to open the .csproj file and do the changes:
<UseIISExpress>false</UseIISExpress> to true
Remove <UseIIS>True</UseIIS>
Remove <IISUrl>http://localhost</IISUrl>
Issue 2. Visual studio doesn't have access to IIS, in this case just open the Visual studio in administrator mode.
I was facing similar issue but none of the mentioned solutions worked for me.
However, I was opening my solution from within visual studio recent solutions list. But when I opened the solution file from explorer by double clicking on it, the project loaded correctly.
This often happens when authentication has not been setup in IIS or the website (or virtual directory) has not been setup in IIS. To fix this problem, open IIS manager.
Make sure a website or virtual directory exists for the project and points to the folder that contains the bin folder for your project.
Open Authentication and enable Anonymous Authentication.
Click Edit while Anonymous Authentication is selected.
Select Specific user, enter your Windows credentials (domain\username).
Open .NET Authorization Rules.
Make sure only Allow/All Users exists.
Go to Application Pools->Advanced Settings.
Select Identity and enter your Windows credentials (domain\username).
This should open up the website so Visual Studio can load your project. If not, go to Advanced Settings for you site and select Physical Path Credentials. Make sure that's set to pass-through authentication.
I was getting this error.
I am using IIS-Express. And I have VS2015.
After messing around with the .csproj file....I was able to get it to work.
After comparing my current file to what was in TFS source control, the only difference was this line.
Previously, this line did not exist. In my "working" (after messin' with it) file, I had
<UseGlobalApplicationHostFile />
Again, in the csproj that causes the error, I didn't have the magic line, but in the working csproj, I had it.
Below is the above line, in context. Only use the below for breadcrumbs, do not copy/paste all of it. The magic line is 3 from the bottom.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}</ProjectGuid>
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyRootNamespace</RootNamespace>
<AssemblyName>MyAssemblyName</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
<IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
I had the same problem when I moved my WCF REST service from IISExpress to localhost. So, what I did was I opened the .csproj file in Notepad and looked for UseIISExpress, changed its value from false to True.
Then opened VS2015 as administrator and it worked. The good thing is that when I run the project it is still running on my localhost not IISExpress.
I had this issue with an upgrade for Visual Studio 2017. It has been fixed and is now available in an updated release.
You can download the latest update via the in-product notification or from https://www.visualstudio.com
Ref:
Project could not be opened because the Visual C# 2017 compiler could not be created
I created a new Sln file.
Close the Solution.
Open the Project file of the main project. Add the offending projects back to the new Sln file.
Save the Sln file over the top of the old faulty one.
I had the same exact error, this is what solved my issue. In the root of your solution you should see a .vs/config/applicationhost.config. In this folder delete the offending site. Mine looked like this:
<site name="FrontEnd.Web" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\xxxxx\xxxxx\xxxxx\FrontEnd.Web" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:3391:localhost" />
</bindings>
</site>
I deleted the entire site tag for this application, saved and then, right-clicked my solution > Add > Existing Project and re-added the project to the solution.
I'm having trouble migrating the DevExpress elements of an ASP web application from one server to another. I basically copied the files and database over into a new server location and made some adjustments to the web.config file to get it connected to the new database. That got most of the site working and pulling data correctly, but the DevExpress pieces are coming up as undefined.
As far as I can tell, the references in the web.config file and on the respective pages is correct and the dll files themselves are listed in the bin directory so I'm rather stumped as to why they aren't working.
Web.config sample
<compilation debug="true" strict="false" explicit="true">
<assemblies>
...
<add assembly="DevExpress.Web.ASPxGridView.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A" />
<add assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A" />
... and so on
Dashboard.aspx sample
...at top of page...
<%# Register Assembly="DevExpress.Web.ASPxGridView.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
This was an inherited project, so I haven't tried rebuilding the application in case my machine imports my settings into the project (example: it was made in VS 2008, and I'm running VS Community 2015).
Are there any quirks to making a transfer like this that I just don't know about or has anyone else experienced this issue? Any help would be appreciated.
Thanks
The first thing that comes to mind is that version 10.1 of DevExpress is a very old version, released in Aug '10. It does not support .Net 4, so you'll need to make sure the application pool for IIS running this web app is .NET CLR Version 2.0.
Note that if you are running in Windows Server 2012, it's actually tricky to install .Net 3.5. Google how to do it if you need to.
The next to check of course if all of the dll's referenced are in the Bin folder.
Could you write the error message you are getting? If it does not have any extra information, perhaps the event viewer of the server (under windows logs/applications) has a more detailed description.
I start a VS2013 VB.Net MVC5 Web Application, set a breakpoint in HomeController About method and run "Start Debugging", navigate to About page and receive the message "Code not running - The current Thread is not currently running or the call stack could not be obtained" preventing any debugging.
If I set a breakpoint in Global.asax Application_Start, the breakpoint works fine. Changing the "Enable Edit & Continue" makes no difference.
Anyone have any ideas what is happening?
Update: My environment was Windows 8.0 Pro with VS2013 Ultimate.
I have since flushed my system and done a completely fresh install of Windows 8.1 Pro, VS2010 Ultimate, VS2012 Ultimate, & VS2013 Ultimate.
Same test done on all 3 versions of VS - File > New Project > MVC (Default). All 3 versions of VS are reporting "Process with an Id of xxx is not running."
VS2013 debug trace reports "The program '[7720] iisexpress.exe: Program Trace' has exited with code 0 (0x0). The program '[xxxx] iisexpress.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'."
I have run VS in and out of Administrator mode and receive the same results. I have uninstalled and reinstalled IIS Express 8.0.
For me the solution was a much simpler one. In my Solution Explorer in Visual Studio, I right click on the web project, chose properties and then navigated to the "web" tab. From there I changed the Project URL to another port number. For example, if it was http://localhost:1052 - I changed it to http://localhost:4356.
Not sure if this helps anyone else, but it worked for me - hopefully it will work for you too!
If you are using 64 bit machine
Go to Visual Studio > Tools Menu > Options
I had the same problem and my solution was the following:
Instead of deleting the main applicationhost.config (in your "Documents/IIS Express" folder), check your solution folder for a hidden ".vs" folder with a "config" sub-folder. If that folder exists and it has it's own applicationhost.config file you need to either rename (or delete) that file or edit it and make sure the website(s) configured inside match the ASP.NET web app(s) in your solution that you are trying to debug. Hope this helps.
I had a similar problem while moving from Visual Studio 2013 to Visual Studio 2015 on a MVC project.
Deleting the whole .vs solution worked as a charm as Johan J v Rensburg pointed out.
The following steps fix the problem for VS 2015 and VS 2017:
Close VS.
Navigate to the folder of the solution and delete the hidden .vs folder.
open VS.
Hit F5 and IIS Express should load as normal, allowing you to debug.
The solution to the above problem was a simple one. Close down dev environments, go to Documents folder and rename IISExpress. Now set environment variable _CSRUN_DISABLE_WORKAROUNDS ( ref: http://gauravmantri.com/2013/02/05/workaround-for-iis-express-crashing-when-running-windows-azure-cloud-service-web-role-with-multiple-instances-in-windows-azure-sdk-1-8-compute-emulator/ ).
Now reboot PC, start VS, load website and run in debug. IIS automatically regenerated the IISExpress folder and the environment variable resolved conflicts.
Well.. for me it was Telerik JustMock Q3 2013 (13.3.1015.0) that caused the problem. Uninstalled it from VS 2013 and the problem has gone..
see also ASP.NET-MVC4 Code Not Running
and http://feedback.telerik.com/Project/105/Feedback/Details/63749-unable-to-debug-asp-net-projects-with-q3-2013
One lost day and many new white hairs... Curse on you Telerik guys! ;)
Another scenario may be that the port that IIS is using for your application is already being used by another running application. Try changing the port and see if it works for you.
I started to get this problem with Asp.Net Core Web Applications in Visual Studio 2017. It didn't matter if it was the .Net Core Standard version with .Net 4.5.2 or the Core version with 1.1 in my case. IISExpress crashed when I started debug.
Tried everything, nothing worked until I went into add/remove programs in Windows 10 and I uninstalled .net core 1.0 runtime (I had both 1.0 installed AND 1.1). Once that was uninstalled, I started Visual Studio 2017 and my .Net Core Web applications (both kinds) and they both started working again!
I made it work by doing the following:
Delete the ".vs" folder under the application folder
Delete the "IISExpress" folder from the Document
Enable the 64 bit version of IIS Express on visual studio by going to Tools -> Options -> Projects and Solutions -> Web Projects
May need to delete everything from temp folder
May need to change the port by right click on project, go to properties, under web and change the project url port.
The similar problem occurs in aspdotnet core with the same error The program '[xxxx] iisexpress.exe' has exited with code -1073741816 (0xc0000008).
Log file setup in web.config did not produce any info also:
<aspNetCore stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
To find exact error the next step with log info in command prompt helped:
> dotnet restore
> dotnet run
In my case the problem was in dotnet core v 1.0.0 installed, while version 1.0.1 was required to be globally installed.
Go to project directory .vs/config/ and remove applicationhost.config . Then restart project.
I have solved this issue for me. Try to change all Deny values to Allow in file %SYSTEM_DRIVE%\Program Files\IIS Express\AppServer\applicationhost.xml. Please, take into account what IIS Express Web Server you are using in Visual Studio Settings, 32 bit or 64 bit, that means I have to check the file in different folders. Then restart Visual Studio. I don't know about security issues for those config lines, so change them at your own risk, but it has solved my problem.
<section name="asp" overrideModeDefault="Allow" />
<section name="caching" overrideModeDefault="Allow" />
<section name="cgi" overrideModeDefault="Allow" />
<section name="defaultDocument" overrideModeDefault="Allow" />
<section name="directoryBrowse" overrideModeDefault="Allow" />
<section name="fastCgi" allowDefinition="AppHostOnly" overrideModeDefault="Allow" />
<section name="globalModules" allowDefinition="AppHostOnly" overrideModeDefault="Allow" />
<section name="handlers" overrideModeDefault="Allow" />
<section name="httpCompression" overrideModeDefault="Allow" />
<section name="httpErrors" overrideModeDefault="Allow" />
<section name="httpLogging" overrideModeDefault="Allow" />
<section name="httpProtocol" overrideModeDefault="Allow" />
etc.
Delete File C:\Users\congt\Documents\IISExpress
None of the above answers worked for me but I finally found what my issue was. Hopefully this will help someone down the line.
First run IIS Express from command prompt to validate that the site can or cannot be run
https://learn.microsoft.com/en-us/iis/extensions/using-iis-express/running-iis-express-from-the-command-line
Im my case, i got an error saying that C:\Windows\Microsoft.NET\Framework64\v4.0.30319\CONFIG\web.config had malformed xml on line 14. Looking at that line in the file it just said null null null null null etc.
The fix for me was to replace the web.config file with one from my coworkers. IMPORTANT you must get the file from someone running the same version ie if you are VS2015 get a copy from someone running VS2015. If you get it from someone running a different version you will see an error saying it could not load an assembly from the manifest.
Hopefully this helps someone that has tried all the suggestions above. I think the cause of this for me was updating from trial mode and adding a product key within VS2017
In my case the issue was that Virtual directory was not created.
Right click on web project file and go to properties
Navigate to Web
Scroll down to Project Url
Click Create Virtual Directory button to create virtual directory
Resolution fix: For me, the problem was related to active chrome sessions. I closed all of my chrome browser sessions and then tried building to chrome again. I am using Visual Studio Professional 2017 version 15.3.2. The VS application I was running into build errors with was a WebAPI project. When trying to click the green play button, I was getting dialog error stating "Unable to start the program 'http://localhost:18980/'. An operation is not legal in the current state. Hopefully this post helps someone.
I have a web application. The platform is Asp.NET 4.0 and I've used web forms. It's not MVC.
I'm getting an error.
System.IO.FileLoadException: Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Access is denied.
I've searched and the error is about MVC. I couldn't find any answer why it's happening at webforms. Also the project is working well at localhost. But when I publish it, I am getting that error.
Thanks...
Looks like you have a broken reference to a DLL in production - the DLL may not be in the GAC on the machine you pushed to. To verify, you can compare the bin folder locally to that on the production machine.
If it's not available on the deployment machine, right click the reference in your "References" folder and set "Copy Local" to true - then redeploy.
Visual Studio is compiling Asp.Net to 4.0, but I need it to compile to 3.5. Where do I change this?
According to this (right click project, property pages, build) it is targeting 3.5, but I'm fairly certain based on the errors I'm getting with install that it's requiring 4.0 components.
Have you checked the <compilation> section of the Web.config file? If it still reads targetFramework="4.0" try removing/changing this value. This has worked for me in the past.
Don't forget, it doesn't matter what you version you compile too, if the web server is configured to run your app under a particular version, it will do. Some ways will work, ie compiled to 3.5 will work in 4.0 app pool. other way round won't.
On IIS7 the version is defined in the app pool associated with your app. IIS6 it's in the ASP.Net tab.
manually in the web.config file
And Automatically in visual studio, in the solution explorer, right click (in the web icon not in the solution icon) -> property pages -> build -> target framework -> change value.
You can check it, viewing the web.config.
name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
it indicate that the web is using net framework 3.5