I am using the Visual Studio "Publish Web" screen to publish my ASP.Net to my web site.
I has worked fine up until recently with the "Mark as IIS application on destination" box checked.
I just recently added a new project to the solution to handle a specific portion of the work, and then added this project as a reference to the ASP.Net project. The problem is now the publish will not work unless I un-check the box "Mark as IIS application on destination".
It seems dangerous to me to publish without this box checked. Does anyone know why adding this new project to the solution caused this issue and how to fix it?
This is the error I get:
Web deployment task failed.((1/20/2012 6:50:00 PM) An error occurred
when the request was processed on the remote computer.)
(1/20/2012 6:50:00 PM) An error occurred when the request was
processed on the remote computer. Unable to perform the operation.
Please contact your server administrator to check authorization and
delegation settings.
Turns out the account on the server expired.
Related
I created an ASP.Net MVC site using Entity Framework. The site is works fine on both IIS and IIS Express.
But when I upload it on an Azure Web App then I get following error:
Attempt by security transparent method
'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()'
to access security critical method
'System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly,
System.String)' failed.
Here's how I am publishing the site. I right click on my solution in Visual Studio and click "Publish". Then I chose "File System" and it publishes the complete site in C:\MySite. After that I upload it on Azure using FTP.
One of the solution I saw on Stackoverflow is to define following code in assemblyinfo.cs which I have already done but no luck.
[assembly: System.Security.SecurityTransparent()]
How do I fix this issue?
Deleting "System.Web.WebPages.Administration.dll" file from Azure bin folder fixed the issue.
Visual Studio 2013 Update 3 and IIS 8.5
I started an MVC 5 project and have been messing around with ssl. Everything worked great until I opened IIS and added a website that pointed to my project. Now, I can run the project with ssl enabled but NOT with it disabled. If I disable ssl, I get the following Error Message in Chrome.
I'm fairly certain my project is setup correctly in Visual Studio. "SSL Enabled" is false and the "Project Url" is http://localhost:#####/ straight form the project's properties.
When this started happening, I figured it was IIS and so I deleted the Site from IIS. This obviously did not fix it. So I tried looking online but couldn't find anything helpful. The only other ounce of information is a photo of the request being redirected in Chrome's network window.
Keep in mind when I run locally with ssl, everything works fine.
(EDIT) - I decided to make this page more like instructions since i have figured this out.
Deploy my VS Express 2013 Web Application to an MS Server on my LAN running:
Windows Server 2008 Standard
IIS 7.0
MS SQL Express
This is some information to help anyone with a similar situation.
I can access the Web Application locally (from VS Express) when I click Debug - Start Debugging. ALSO - At this point it is connected to the MS SQL Express Server on my LAN and not a local database.
Time to publish the Web Application to my IIS 7 Server!!!
NOTE - The method below WORKS FOR ME. There might be better ways to do it but I found any info on this exact setup very limited.
VS Express 2013 Web Deploy pre-reqs:
(on IIS 7 Server)
-Web Deploy is installed, http://www.iis.net/downloads/microsoft/web-deploy
-Set Up Security on Web Deploy, this site helps:
http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy
In Project:
Right Click your project name, choose PUBLISH...
PROFILE - Name or import your profile
CONNECTION
-Server: LAN address of your IIS server
-Site Name: Name of Site on IIS
-User/Pass: (Credentials you set up earlier in Prerequisites)
-Destination URL: (I leave blank for now)
SETTINGS - Click the arrow below FILE PUBLISH OPTIONS and check the 'Exclude App Data' setting (this is assuming you are running MS SQL on the IIS Server).
Select your Database string, it should be in the drop down list)
PREVIEW - Web Deploy will give you errors when you try to PREVIEW, resolve these errors using MS Websties, Stack Overflow, etc. **WHEN YOU GET THIS ERROR: "#ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH" (full Error message below), your Web Deployment is ready
PUBLISH the web deployment, it wont work, thats okay. It creates a publish profile
Right-click the project and choose PUBLISH again, this time use under the CONNECTION tab choose WEB DEPLOYMENT PACKAGE, take note of your folder location (Step 8). All the database/file settings should be the same (doublecheck if you like), PUBLISH the Web Deployment package
Log onto your IIS Administration (on the Server), right click the NAME of the Server (top level) and choose DEPLOY - IMPORT SITE. Navigate to the folder where you saved the package in step 7. (or transfer it with a USB Stick, etc)
IMPORTANT - When importing the profile, at the second screen, UNCHECK the boxes related to .NET 32-Bit etc. (there are two of them)
Leave everything else on defaults and import the site (successfully?).
At this point when I browse the site from IIS I get a 403 Forbidden Error.
I fixed this using code from comment below:
After that my Web App was from the IIS Server. I'm continuing with MVC tutorials found here:
http://www.asp.net/mvc/tutorials/mvc-5
I'm hoping once I understand enough about MVC and EF6 I can connect the Web App to MySQL rather than MS SQL and still build Code First Applications. If anyone has info on that please post it in the comments.
If this post helped you please Vote up top, I'm new to the STACK.
**Full Error Message from post above:
Web deployment task failed. (The versions of the .NET Framework Configuration Provider (rootWebConfig32) are different on the source (4.0) and destination (2.0). Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH.)
I think your issue might be permissions. What is your authentication set to? In debug mode, you're typically working as yourself, whereas if you deploy, you are setup as a different user, most likely anonymous. With that in mind, you should be able to correct your problem.
Good luck!
It was a combination of things. I finally got it working.
I created a Deployment package following instructions found on MS site and others.
Before Publishing my deployment package, I ran a "Preview" (PREVIEW section of the wizard). This was bringing up various errors related to Security and other issues I fixed using MS support sites.
WHAT I FOUND ON MY OWN - (Its fairly simple), after you create the Deployment package without issue, go to IIS on the Server side, click the Server Name in IIS (top level) and choose Deploy - Import Package. In the second or thu=ird step there is a screen where you select items to be imoported (mine had everything checked). I UNCHECKED the two related to .NET Config files and imported it. Voila, it worked.
It still wasn't letting me view the site. I had to add this line to the web.config file and it fixed everything.
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
If anyone wants a mored etailed description of what I did let me know and I will try and redo my process/tutorial with more exact instructions.
to get the same publish behaviors with direct publish from VS, you can uncheck following box : properties\Package/PublishWeb\include IIS express settings as configured in ISS express
I'm trying to publish a local web project (this is a basic MVC template project, nothing special) in 2013 Visual Studio Express to an IIS file. It's building and publishing the files to where I want them to go - but when it opens the link to the project in IIS to view in a browser, I'm just getting the "This page can't be displayed" without any other hint as to why, or a specific error msg.
I'm pretty sure its something in IIS that's dodgy, since I'm not getting any errors from VS when I publish and its pushing the files from my local folder to the IIS folder.
This is what I've done so far in IIS:
installed the Wed Deploy extension and added the proper publishing permissions
added the web site to the "Sites" folder.
filled in the site name, used ASP.NEt v4.0 as the application pool.
put in the physical path to the folder
entered the host name: www.webtest.companyname.com
Then I went back to VS and set the Web Deploy settings. I created a new profile, used the "Web Deploy" publish method and I got all the information in, validated the connection and then hit publish. The build succeeded and I didn't get any errors. I went back to IIS and saw that the files had been published but when you click the link under the:
"Browse Web site" link which reads: www.webtest.companyname.com on *:80(http)
All I get is the error: This Page Can't be displayed.
Any thoughts or ideas on why I can't get this project to work in IIS 7?
I'm having this error trying to debug my ASP.NET MVC app. I've set the app to "Use Local IIS Web server", and selected ASP.NET as the debugger. Running the site without debugging works just fine, but when I try to debug, I got this error:
Unable to start debugging on the web server. The web server could not find the requested source.
I'm using Visual Web Developer 2008 Express Edition.
Does anyone know how to fix this error? Thank you.
For those encountering this with Visual-Studio 2012 and/or Windows 8 do the following.
You have to add .Net 3.5 (or 4.5) to your Turn Windows Features on or off window. You get to it via :
Control Panel -> Programs -> Turn Windows Features on or off
Click the Asp.Net 3.5 and the Asp.Net 4.5 check box in the IIS > WWW Service > Application Development Features folder.
Go to your web project's properties, then the "web" tab, then make sure that you're using the Visual Studio Development Server and not Local IIS or the custom webserver. I'm on VS2010 with Win7 and another developer was developing using a custom webserver URL and not the VS Dev Server
Sounds like you are trying to develop on IIS and not iis express or development server. If you are using asp.net mvc 4, make sure that the Application Pool is framework 4. If not just make sure that your app pool it matches your asp.net mvc version.
I had the same problem, and i fixed this way:
Go to IIS Manager -> Go to the site -> Error Pages -> Actions: edit feature settings.. -> Make sure you checked "detailed errors for local requests and custom error pages for remote requests".
IF you are using IIS6 and did the add mapping for .* in IIS trick to get MVC working, when you added the .* handler to iisapi.dll you forgot to uncheck the "check the file exists" check box.
Also, be sure that the URL you're configuring in Visual Studio matches your Host Headers (Edit Bindings) in IIS. This tripped me up for about an hour this morning before I realized my very stupid error.
Having maxRequestLength or maxAllowedContentLength set to a ridiculously large or small value will also trigger this error.
What i did, was just type the IP address in the web tab instead of "localhost"
This happened to me today. Turned out to be that the default website was stopped in iis. I had been working on a second website that didn't use it for a long time. Simple fix but took me a while to see it!
The root cause for this error can often be that the Windows Service W3SVC is not started. Check that this service in Windows Services console (services.msc) is started. In IIS you will now see the the Start icon is greyed out. This means that the W3SVC service is running.