Published .Net Core Web Application to Apache2 Web Server only Showing up as Directory Search - visual-studio

I am currently working on setting up a QA server at my home in order to test applications, and I have run into a bit of an issue. I have attempted to publish my .Net Core 6 website to the server by the following steps:
Publishing the website via Visual Studio, to a local folder. Visual Studio Publishing
Copy the published website over to the server via Filzilla. Filezilla Copy
Unfortunately, when I go to the url I only wind up with a directory search of the published files: Directory Search
The webserver is Apache2, running on Ubuntu Server 22.04. How can I get my website up and running on this QA server, rather than just a directory search?
Thanks in advance for your help!

4L4M1N's comment is correct. The publish files you generated just for windows IIS. not Apache2.
So you need check the official to create .htaccess file, and the webserver will be working.
Reference Video:
How to Deploy .Net Core Web Application to Ubuntu Linux

Related

How to deploy ASP.NET Core app to Apache on macOS?

I'm running the Visual Studio for Mac (Preview) 17.4, and I've built a new ASP.NET Core app (Razor). It runs on my desktop Mac's localhost fine via Debug > Start Debugging. Cool.
Now I'd like to deploy it to another macOS server, on which I've installed the .NET 6.04 SDK, which includes both the Runtime and the ASP.NET Core runtimes, from here:
https://dotnet.microsoft.com/en-us/download/dotnet/6.0
On this Mac server I've also installed Apache (using Homebrew), which has a working test HTML website serving from here:
/usr/local/var/www
Visual Studio has a Build > Publish to Folder option, which currently dumps all its files to a local folder on my dev machine:
[local project folder]/bin/Release/net6.0/publish
...it contains DLLs, .JSON, a UNIX executable, a wwwroot folder of static content, and a runtimes folder. I don't see any pages (in VS my web app is comprised of .cshtml pages)
So my question is, can someone explain where the binaries go in my target Apache site folder to properly serve this Razor project? Or share any guides on how to get the VS-published output running within Apache on the Mac server? I've copied the files over into the Apache website folder, but haven't been able to serve anything correctly. I found some guides for Linux but not specifically Apache on macOS. I come from a Windows background so don't know a whole lot about Apache on macOS, which is why I'm trying to get this dev site running on it.
Thanks
In Visual Studio, go to Build > Publish to Folder and choose a local folder to publish to.
On your Apache server, install the .NET 6.04 SDK from https://dotnet.microsoft.com/en-us/download/dotnet/6.0. This will include the Runtime and the ASP.NET Core runtimes.
Copy the contents of the publish folder from step 1 into the Apache website folder.
Edit the Apache configuration file to add a virtual host for your ASP.NET Core site.
Restart Apache.
Your ASP.NET Core site should now be accessible at the virtual host URL you configured.

Deployed application using InstallShield does not work

If you see below image, there are two applications deployed to IIS.
QManualDeployment - This is deployed using Visual studio Publish feature.
InstallShieldPOCWebApplication - This is deployed using InstallShield installation tool.
Option 1 is working without any issues, but as you see InstallShieldPOCWebApplication it looks like foder rather than web site. Also it does not work.
How can I deploy application as website using INSTALLSHIELD
Here is my IIS Settings from InstallShield Tool
Default Web Site is a website. QManualDeployment is a virtual directory / application off of Default Web Site.
In InstallShield, it isn't enough to just author all of your directories/files into components. You also have to define the IIS configuration.
I'm not sure if you are using InstallShield Express, Professional/Premier of Limited Edition so I can't give you more direction then that.
I faced same issue with Post owner, after run Install Shield setup file, it show a folder in IIS and I resolved by right click to folder name and convert to Application.
I share for whom concerned.
After that we can select suitable application pool as

How to Publish an Umbraco Intranet?

I have just completed an Umbraco intranet using WebMatrix. Now I want to publish it to our server so that everybody can see and use it. WebMatrix can only do Web Deploy or FTP, so I opened the project in Visual Studio 2013 to publish it there. I was able to publish it to my desktop, where I have attempted to get it running here before uploading to the server. So in IIS I 'Add a Website' and set up the project, using port 101. I tried it both on my desktop and then moved it to wwwroot and in both cases IE says 'This page can't be displayed'. I am using the CE database with Umbraco 7.2.4.
Help please. I've been at this for days now.... I've tried the umbraco forum and google and got nowhere. :(
Tony
If you have remote desktop access to your web server, you don't actually need to rely on web publishing. You can just build the website in release mode, and then copy all the folders from the web project onto the webserver.
On the web server you can manually set up an IIS website and set up host names etc. You shouldn't need to deploy it using visual studio, this way is much safer
In IIS, you should set up a new website, using port 80 on your HTTP binding.
From the sounds of the error, IIS is not looking at the right physical path.
You should use the Microsoft guide on How to set up your first IIS Web Site as a starting point.

How do I run (debug) WCF REST Service application on local IIS7 server

As the question says, I have a problem running the web app on local IIS.
Here is my situation:
WIndows over Oracle VM VirtualBox running on Linux Ubuntu.
Bridged Adapter so that Windows box gets local IP from my router.
Visual Studio 2010 + sp
WCF REST Service application plugin for project template
The application runs when using visual studio development server (on localhost).
Target framework is v4.0
What I need is that the application runs on IP instead on localhost (so I can consume it on remote computer in LAN), so I configured IIS7.
Here is IIS configuration:
I created a website with target framework v.4.0
I binded the site to my local IP on port 80
Path to the site is /inetpub/wwwroot iisstart.htm as default document
IIS runs ok. If I open "http://my_local_ip" I get the welcome logo.
The problem is in visual studio.
When I go to project properties "Web" section and select local IIS over vsd server is where I get lost. If I set "Project URL" to "http://my_local_ip/some_name" visual studio complains that it cannot find IIS server and so it was unable to create the virtual directory. I tried manually adding virtual directory in IIS manager, but no effect. If I use "http://localhost/some_name" as the "Project URL" the virtual directory gets created, but it makes no sense does it?
Could some one please enlighten me?
If I use "http://localhost/some_name" as the "Project URL" the virtual directory gets created, but it makes no sense does it?
I think you are mixing two different things here. When you ask VS to use localhost as the IIS Server for your project, it will connect to the local IIS to perform configuration tasks. If you ask VS to use "my_local_ip" you are telling VS that you IIS Server is remote, and therefore VS will use remote administration to configure IIS (VS can't know that my_local_ip is the local computer).
But remote IIS admin isn't enabled on a default WinServer box. Furthermore, it would require some additionnal network config. You should therefore tell vs to use the local server.
In fact, IIS site bindings and VS deployment parameters are too completely different things. So, deploy your site on http://localhost/your_site.
However, I don't really like the prospect of using VS debugging deploy to deploy a real app. The directory will contain all your project files... You should:
create your site on IIS manager and setup a virtual directory.
Either
ask VS to publish the site to a directory (your virtual directory)
ask VS to publish a WebDeploy package, then ask IIS manager to import the package.

What's the easiest way to deploy an ASP.NET MVC 3 project to Windows Server 2003?

Is there some kind of deployment wizard I can run and have it install just the things it needs to run right onto the server end point? Do I have to build the project using VS2010 on the server? If I can't get this thing deployed today I am really going to be screwed.
IIS 6 is there and I think .NET 4 is installed (I tried installing it from Microsoft and they had me install a million things like VS2010 express and SQL Server and all this other crap, the install failed but .NET 4 does show up in IIS).
I achieved this by enabling an FTP site for the IIS server website and using this to deploy the web application within visual studio 2010 which will build and deploy just the changed files for each build. Works very well. You can even add a Publish toolbar to help deploy regularly more easily.
All you have to do is install the .NET Framework 4.0 (32 / 64 depending on build) and run aspnet_regiis.exe in the Framework folder.
For me this is located here:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe
Hope this helps!
You can also use the publish command from VS 2010 to save it to the filesystem and then copy the files into an IIS site on the target server. Just map a network drive to X: or something (for your sites root) and publish directly to the share.
You can take a look at Web Deployment projects or even the VS "Publish" feature
From the Build menu in VS2010, just click Publish [name of your web project] and enter the location on your web server where the site is going to be hosted.
VS2010 will publish the files required there.
It shouldn't be necessary to install VS2010 Express, just to deploy a site. But if .Net 4 and ASP.NET MVC 3 is installed, you should be able to deploy. Right click the web app in VS2010, and hit Publish.
Remember to set the configuration to Release!
But, with IIS 6 you could be in for a fight in regard to HTTP Modules, Handlers and other server configuration. Anything inside your Web.config's system.webServer section will always be ignored by IIS 6.

Resources