Publishing from Visual Studio 2015 - asp.net

I am trying to publish my ASP.NET 5 MVC6 application to godaddy server from Visual Studio 2015. I have imported publish profile from my server and I am able to validate the connection. However, when I publish my app I have the following error:
ERROR_USER_UNAUTHORIZED
Web deployment task failed. (Connected to the remote computer
("XXXXXXX") using the Web Management Service, but could not authorize.
Make sure that you are using the correct user name and password, that
the site you are connecting to exists, and that the credentials
represent a user who has permissions to access the site.
The credentials are valid, I can publish VS2013 sample project from VS2015, but I can not publish VS2015 sample project as well as my app from VS2015 with the same credentials.
The user is an admin on the server.

The first thing you need to check is if GoDaddy supports 4.5.1 on their server. Once this is confirmed? We can start working!
Helios (the shim between IIS and ASP.NET 5) requires at least 4.5.1 to run so this is why it's essential.
Only thing missing is running a dnu publish and making sure that you have a web.config with this section in it:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
If it doesn't work, I would get in touch with GoDaddy for some support. If they do not support the latest version of the framework, you might have to revert to MVC 5 or switch to azure-web-sites if you really want to enable asp.net-mvc-6.

Related

Unable to run migrated web application in VS2013

I have an ASP.Net web application developed in Visual Studio 2008 (.Net 3.5). I have copied this solution to another root folder (both on my Win7 64b machine) and upgraded the copy to VS2013 (Professional) and .Net451, but when I try to debug the web app in VS2013 I get an Access Denied error ("Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server"). I don't have this issue runing the original from VS2008 on the same machine.
Apart from the changes mentioned above the two are a straight code copy.
In VS2008 the project Web properties are: Use Visual Studio Development Server, auto-assign port, Virtual path = /
In VS2013 the project Web properties are: Server=IIS Express, Project URL=http://localhost:63064/ (and I have clicked on Create Virtual Directory)
I can see this must be some sort of security issue, but what extra needs to be done to get a VS2008 web app, upgraded to VS2013, to run within the VS2013 IDE?
Postscript: If I start the web app without debugging (ctrl-F5) I get "HTTP Error 503. The service is unavailable."
It turns out that the simple solution is configure the web app properties in VS2013 to use the local webserver (IIS) instead of IISExpress, and also to run VS2013 as administrator (but this is not necessary for VS2008). So obviously it is an IIS permissions thing but IIS is common and hasn't been changed - so what has changed in VS2013 to make this necessary? I don't really want to run VS2013 as administrator if I can avoid that.

How to publish ASP.NET Core 5 Web Site to IIS?

I installed Visual Studio 2015 RC and created the sample Web Site project.
I published it in Visual Studio using its publishing tool to file system. The output is:
I tried to target IIS both this folder and wwwroot folder but nothing changed. I always receive an Access is Denied error.
Checked the permissions. They are OK. I'm always able to run my other web sites...
I want to publish it targeting clrcore. But I already tried to publish it using clr and failed there too. It is the same error.
How is the publishing process should be when I want to run a coreclr website in IIS? And I don't even know if it is possible to serve a coreclr project on IIS.
By the way there is nothing about .NET Core in application pools dialog in IIS. So I don't know what could my poor IIS do here.
There are full instructions from MS:
http://docs.asp.net/en/latest/publishing/iis.html
TL;DR
You need to install HTTP platform Handler. Other than that, if you could get a standard MVC 5 app to work, you should be ok. The only change I needed to make was installing the plstform handler.
Of Course, In VS I publised to a folder, then copied the contents to the Web server. The root folder to the site must point to the wwwroot and the approot will be at the same level.
As far as I know, You can't host ASP.NET Core 5 Web Site on IIS, it works with self hosting only.

Debug ASP.NET application using remote IIS

I'm developing ASP.NET applications using Visual Studio 2012. I've always used IIS express to test application while developing, but now I need to test it on production environment.
IIS is running on a remote server, I installed there the Remote Debugger studio, created an application under default site (\test\baseTest), created a test project in Visual Studio 2012 and set to "Use Custom Web Server" at path http://myServerName/test/baseTest/.
Ok, there we are, I press F5 to start debugging, the connection through debugger works correctly (I can see a new line saying "myDomain\myuserName connected" but... the application is void, I miss all .aspx files.
Am i missing something? Should I set some parameters in Visual Studio to deploy all file when debugging to remote site?
This is remote debugging not automatic deployment.
You should copy all the website files to the remote iis.
Remember to build in debug and deploy all the .pdb files.
Check also in web.config.
<system.web>
<compilation debug="true" />
</system.web>
Launch the Remote Debugging Monitor (msvsmon.exe) when you start debugging
There you can find a comprehensive guide to remote debugging:
http://www.codeproject.com/Articles/38132/Remote-IIS-Debugging-Debug-your-ASP-NET-Applicatio
To debug asp.net application from IIS you need to attach w3wp.exe process by going to Tools->Attach to Process option. You can see the detailed steps of debugging using IIS with diagram on this link: Debug asp.net application using IIS

The requested content appears to be script and will not be served by the static file handler.IIS 7.5

I know there are related posts here on this forum and another resources but I got stuck with this and couldnt proceed.Problem is i've done a website with vs2010 when i publish it to ftp server and navigate to url adress I got this error. Here the things that i've done
-I've enabled IIS services and static content
-I've revert to parent the staticFile under handler mappings
-I've registered the asp.net again in command prompt(the regiis.exe thing)
-In IIS manager i've added my website adress under sites, stopped default web site and started mine.
-I've added my site to classic.NET AppPool(integrated,and v4.0)
-I've enabled the default browsing..
-I've done all the advices that generally covered..
Here is my web.config
<configuration>
<system.webServer>
<directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension" />
<defaultDocument>
<files>
<add value="AnaSayfa.aspx" />
</files>
</defaultDocument>
</system.webServer>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
</configuration>
where am I doing mistake? I've spent 2 days and couldnt proceed an inch.I will burst into tears if this problem solved.Any help will be greatly,greatly,greatly! appreciated,will be my hero,master (: thanks
Go to Command Prompt and install / repair ASP.NET
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
Go to IIS => Select the Server Name (System Name)
Go to ISAPI and CGI restrictions
Allow the Not Allowed restrictions.
I got this working when i change the app pool's .Net framework version to my application's .net framework version.
My application's framework version was 4.0 but app pool's setting was defaulted to 2.0. I had to change it to 4.0, then it worked fine.
+1 with #Dablue, IIS 8.5 does not support the aspnet_regiis command anymore. For me, the issue is resolved by installing the "Asp.Net 3.5" or "Asp.Net 4.5" under
Web Server > Application Development.
#regeme - I was experiencing a similar problem when trying to run my own site and after a lot of digging I finally resolved it. In my case it was related to a *.json file trying to be loaded and no rules being initialized for it. If you look closer at your error it should give you an idea of what it is IIS is not loading.
After looking at the web inspector's network tab I was able to see which items were returning 404's they were all *.json.
I'm assuming since your error is returning a "content appears to be script and will not be served by the..." it is the same case.
My resolution:
A) It is possible you have already done this as it would throw another error, I'm just covering our bases.
Go to IIS HTTP Response Headers
create a mime-type ".json" "application/json"
B) **SEE NOTE
Go to Handler Mappings.
Set Request Path: to "*.json"
Executable: to "C:\Windows\System32\inetsrv\asp.dll"
C) You may want to restart your service at this point again just to be safe this can be done in the IIS panel or cmd prompt.
Windows key + r
type: cmd and hit ctrl+shift+enter
type: iisreset and hit enter
*NOTE: This may save you a lot of headache, in my case I installed the 64 bit dll of asp.dll instead of the 32 bit version the folder for the 64-bit version is in C:\Windows\SysWOW64\inetsrv\asp.dll
IMPORTANT these file locations are in windows 8 and to my understanding are the same in windows 7 but this may not be the case for your OS double check.
Lastly if you are missing the asp.dll this is simply because you are missing windows features. Simply go to add/remove programs (Programs and Features)
Turn Windows features on or off
drop down Internet Information Services
drop down World Wide Web Services
check Application Development Features make sure it's not just a partial check and that all sub-items are being installed
On Windows 2012 and IIS 8.5 aspnet_regiis is no longer valid.
Instead, add the aspnet-4.5 rolefrom within server manager
Open server manager
in the left column select IIS
Scroll the right window until you see "Roles and Features"
Tasks select Add roles
Under "server roles" open "Web Server (iis)
open "Web Server"
open "application development"
Select "ASP.NET 4.5" (the "asp.net 4.5 extensibility" will not do it)
We got the same issue when hosting our MVC application on the web server. All the applications were working fine except the WCF service.
It was resolved, when we added a server role for .NET Framework 4.5 WCF service in Windows Server Manager.
Visit http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2013/02/08/how-to-enable-and-use-net-framework-3-5-and-4-5-in-windows-server-2012.aspx
For me the issue was fixed by right click on Virtual directory-->convert to application
Check out this, in my case this solved the problem
https://support.microsoft.com/en-us/kb/2019689
This might help you
In this case, a 404.17 error is returned if the *.aspx resource being requested from the site is handled in an Application pool that is not running in Classic Mode, is not 32 bit, or is not running the 2.0 version of the .NET Framework. In order for the resource to be served correctly in this example, all 3 pre-conditions must be met. Specifically, the application pool hosting this resource would have to be configured for Classic Mode, it would need to be configured to use the 2.0 version of the .NET Framework, and it would need to be set for 32 bit applications.
I had to create a new Web Site. There was some invalid configuration in my Website level that referenced my application's virtual directory directly.
For example, https://server/app gives me the 404.17 error but https://server/app-test works successfully. Swapping the two application names (using appcmd) caused the working app-test (now renamed to app) to begin failing. After creating a new Web Site named MyApp Web Site I was able to again create a new app, this time named app that worked successfully.
After extensive review of Default Web Site we cannot identify what configuration is causing 404.17 for apps named app and not alternatively named apps like app-test.
I believe the ultimate cause of this, is I did not have .NET Extensibility Services and ASP.NET 4.5 added through the server roles and features—During installation. Thus, the installer of my app failed to successfully configure Default Web Site correctly. For example, the created app pool incorrectly installed with v2.0 Integrated and not v4.0 Integrated. After installing the required roles and features I verified ISAPI (64 bit v4) was configured correctly, and the App Pool was appropriately configured for v4 Integrated. Unfortunately, I cannot identify any additional settings that would cause this issue—especially explicitly targeting the app virtual path.
This solved the issue for me. +1 to all who spoke a reasonable solution without having to pass through a 3 ring circus.
Turn on IIS Windows Features like these

How do I deploy MVC3 Hello World App to localhost and configure IIS

I am having some trouble deploying my MVC3 application to my localhost. I am looking for details to build and deploy a ASP MVC 3 application to my local system. I've tried to deploy this, but have run into problem after problem. Instead of tracking each problem down separately (and I may have to do this anyways) I would like to create a one stop guide for myself and others that see this post.
I'm looking for steps including libraries to install (ASP MVC3, IIS, etc) on a Win7 SP1 machine with VS2010 installed. Also how do I set up IIS, and how do I publish? The goal will be to deploy this web app to another Win7 machine in the house, but localhost will be the first step. In addition, it would be helpful to know whatever steps are necessary to make the website accessible from another machine on the same network.
Here is what I have done so far:
Created an ASP MVC 3 application with VS2010
Built and Run
Installed IIS
In IIS - "Added Application" on "Default Web Site" with the Alias: "Hello"
4a. "Hello" runs on the DefaultAppPool, .Net 4.0; Integrated Pipeline
4b. "Hello" has the physical path C:\inetpub\Hello
In VS2010 - right clicked the project and selected "Publish", using FTP
web browser: navigate to "localhost/Hello"
500.19 - Internal Server error:
Config Error: This configuration section cannot be used at this path. This happens when
the section is locked at a parent level. Locking is either by default
(overrideModeDefault="Deny"), or set explicitly by a location tag with
overrideMode="Deny" or the legacy allowOverride="false"
Config File:
\\?\C:\inetpub\wwwroot\web.config
Requested URL:
http://localhost:80/Hello
Physical Path:
C:\inetpub\Hello
Config Source:
68: <validation validateIntegratedModeConfiguration="false" />
69: <modules runAllManagedModulesForAllRequests="true" />
70: </system.webServer>
Download and install ASP MVC 3
Create an MVC3 Hello World App in Visual Studio
Install IIS from the “Windows Features” / “Turn Windows features on or off” in Windows.
Next, you need to configure a website in IIS. I created one on port 81. Open IIS Manager, and “Add a Website” to the “Sites” node.
For this website, I created this on D:\WebSite, and configured it to run on DefaultAppPool, configured for .NET 4.0, on port 81.
Most of the time, IIS is installed after installing the .NET Framework, so you’ll need to run some commands to register ASP.NET on IIS.
start cmd.exe as an administrator and run aspnet_regiis -i in C:\Windows\Microsoft.NET\Framework64\v4.0.30319
Initially, I had some trouble publishing the project to the destination but for whatever reason, Publish method: “FTP” to Target Location “D:\WebSite” seems to work quite well and publish only the minimum required files.
traditionally you could only deploy to your server using ftp. Though it doesn't make a lot of sense to ftp to a server which runs locally. However Microsoft recently introduce the Web Deployment Tool which works really well. Once you install them then you have the option of creating a deployable package
In Publish dialog, choose option Filesystem instead of FTP, and give it path you have set in IIS

Resources