Publish ASP.Net MVC application without .exe - c#

After I publish my ASP.Net application using Visual Studio 2015 to my web host I get Access denied when I type the adress in the browser.
I called my web host support and asked why and he told me they don't allow .exe files, and there is .exe files inside my bin/roslyn folder.
How do I publish my project without the .exe files?
Update:
After reading the comments i found that my project is actually using Owin. I tried following these steps but when I try to uninstall Owin I get error: SignalR Core is dependent on Owin.
Is it not possible to use SignalR without self-hosting the web page with Owin?

Related

How to host a DotNet Core 6.0 WebAPI project on IIS using CLI?

I am trying to host my webapi project locally using IIS server. I am using VS Code to create my webapi using .NET 6.0.
Here are the steps I took:
I ran dotnet publish --configuration Release. This created files under 'bin\Release\net6.0'.
I downloaded the ASP.NET Core 6.0 Runtime (v6.0.2) - Windows Hosting Bundle.
Next, I created a website in IIS using the Physical Path as 'bin\Release\net6.0' and set the port to 8084.
Now when I try to browse to the path, localhost/8084/api/users it returns 500 Internal Server Error. What am I missing?
Settings for IIS
I was able to find the solution go this, thanks to #gunr2171.
The issue was with using user-secrets. When using user-secrets, IIS is not able to find the secrets.json file. This caused the application at IIS to fail with null reference(Found this through Event Viewer).
A solution that I found to this is - for development purpose, we can copy paste the secrets.json file to the physical path being used by IIS to host. This lets us continue hosting through IIS without issues.
You need to install this bundle, then try again :). Check your .net core version

How to Publish ASP.NET Web Application (.Net Framework) with Visual Studio to FTP Server?

I am trying to publish an ASP.NET Web Application (.Net Framework) to a subdomain on my webhotel. The problem is that when the site has uploaded and I visit the page, the site is not displayed, only the code in the index.cshtml file is shown in the browser. The site consists of Razor Pages.
I have checked the root directory for the subdomain at my webhotel and noticed that there are no .dll files which I was expecting there would be. What might the problem be and how can I solve this?
I have been informed by the support from the Webhotel Host that it is not possible to publish a Web Application to an ordinary FTP server. Instead I have found that Google Cloud Platform or equivalent, is needed to host a Web Application. The directory needs to be specifically prepared for a Web Application.

Uploaded mvc5 application files without publishing files in live site using code first

I have created the MVC5 code first Website on IIS and established the site with the Application pool in Live., then I did it manually. I did not publish my application, because the IT Network team do not know the publishing process. I uploaded as it visual studio files into live, users are registering live successfully but I saw so many examples are saying to publish the site, please suggest I have to publish my application is mandatory. And If I will keep my application like now into live any issue will come in futures.
There are multiple ways supported by Visual Studio to deploy an application. One of them is to publish it to local folder. You can publish your application to local folder, create a package and deploy it to hosting server.

Visual Studio Publish profile settings for Single Page App on Azure

I want to publish my single page app to Azure. I have created the App Service, App Service Plan and downloaded the publish profile settings on my local. Now I can use FTP to publish it to Azure. But I am wondering if there is a way I can configure this in the my Visual Studio similar to what we do when publishing a .Net application (MVC or Web API) as shown below in the snapshot.
My single page application is not part of the solution. This is how the structure of my projects look like.
It has one .Net Core Web API project and one Single Page App created in Vue.js. I can publish the Web API project from the Visual Studio but not the SPA. Any help with this please?
Per my knowledge, it is impossible to publish it in Visual Studio similar to what we do when publishing a .Net application. There is no Publish... option for us to choose.
As a workaround, we can upload our SPA project to Azure web app via KuDu.
More information about KuDu, we can refer to: Using KUDU with Microsoft Azure Web Apps
We just need to drag the SPA project into KUDU under wwwroot folder as below:

Publishing a web application remotely

i have a piece of C# code and I need to publish that so that I can get an URL which will be passed to another team for integration.
My problem is I have no access to Inetmgr due to some admin access issue.
how can I publish my web app remotely(on to my peer system )?
Using WebDeploy.
It's an IIS add-on which opens a Web service to publish a Web site remotely.
Visual Studio and TFS Build can publish sites using WebDeploy, and you can also deploy using the command-line interface.

Categories