Publishing ASP.NET MVC 4 Application to server IIS6 - asp.net

In the office we have a server on the 'N' drive and we use IIS6 to create folders on our current domain which are then used as test directories for website building. Our website's domain is 'www.example.com' and sometimes, when I want to create a test environment for a new website, I'll go into IIS6, create a new directory e.g. 'test', make into into an application and then upload the website files and navigate to 'www.example.com/test' to find the website that I've built.
I've recently finished building a new website using ASP.NET MVC 4 platform, but I'm having a bit of trouble actually publishing it to a new directory that I've created e.g. 'test2'. I'm currently trying to publish it by right licking the project in VS 2012 and clicking publish before electing to publish the project using the 'file system' method and selecting the directory I wish to public to 'test2'. After clicking okay, the files are published okay but when navigating to 'www.example.com/test2', I get a 403 error message.
I'm obviously doing something wrong, so if anyone has any idea of what's going wrong I'd appreciate your help.
Thanks

I don't believe IIS 6 supports MVC

Related

How to configure Asp.Net Web Application with IIS

I am using Asp.Net Standard version 4.7 with MVC and attempting to deploy to IIS Express. I am facing several issues in the configuration and cant seem to find straight forward documentation for asp.Net standard. I added a website named localHost aside from Default Website in IIS. I am facing 2 issues.
When I click browse from IIS, it navigates http://localhost/Views/Home/Index.cshtml I get a 404 error.
Server Error in '/' Application. The resource cannot be found
When Debugging From Visual studio 2019 I get
Process with Id of xxxx cant be found
.
Description: HTTP 404.
I am thinking there some port configuration issue but I am unclear on how to configure.
I attached screenshots of my configuration settings.
Please follow Microsoft guideline.
You are trying to access wrong Url. Try below url to access:
http://localhost:8080/Home/Index
Maybe you are misunderstand MVC, you should visit a restful path in mvc instead of cshtml, just like this: http://localhost:8080/Home/Index -> to find /Views/Home/Index.cshtml in you solution.
To host the site .net application you need to publish it and use that publish folder as site folder path in iis.
1)open visual studio, select your project.
2)right-click on your project and choose publish:
3)in publish target select folder and create a new folder in c or another drive where can you access the folder.
4)click on the publish
5)open iis and create a new site
6)choose the folder path and site binding
7)browser your site.
Note:
Assign iis_iusrs and iusr full permission to the site folder. you need to set the physical path credential with your Gmail account.

Mulitple application under Default website IIS asp.net

We have got a space in our company server with url tools.mysite.com which is a .net based web application. So its working fine in our domain. But now we have new requirement of setting up a new application under tools.mysite.com which is also a separate web project done in ASP.NET 4.0. Unfortunately I dont have any previous experience of setting up IIS single site with multiple application. But with little googling, I tried creating a applicaiton under Default website (tools.mysite.com) and specified the physical location and alias as downloads.
So obviously as I expected I am getting that path in browser like this and for testing I put a test.txt file there.
tools.mysite.com\downloads\test.txt
which is working fine
But the challenge is when I try
tools.mysite.com\downloads\default.aspx
its triggering an error resource cannot be found. But default.aspx is there which is my home page I have created and its loading fine when I run the application from Visual Studio itself.
So please help me to run my second .NET based application.

Routing issues after publish asp.net mvc app

I recently developed an asp.net mvc application that want to publish online. I used the Publish option on Visual Studio to do that.
Apparently this is a common task and there are several tutorials about that. However my case has a different detail that I believe is not allowing me to run the app successfully.
So the thing is:
I have a Wordpress site successfully running at www.somedomain.com
I want my asp.net application to run at www.somedomain.com/myapp
This is what I have done so far:
Uploaded all my app files to httpdocs/myapp folder on the server;
Configured a virtual directory on httpdocs/myapp folder on the server;
Imported the database from my local computer to the remote server;
Changed the connection strings on web.config to point to the database on the remote server;
After this, when I try to access on the browser to www.somedomain.com/myapp I can see that it redirects me to www.somedomain.com/myapp/Account/Login?ReturnUrl=%2Fmyapp%2F but shows the 404 error (Page not found) with the layout of my Wordpress site. So it looks like it is running the Wordpress site, instead of the asp.net app on that folder.
are you using IIS?
you need to create an application instead of a virtual directory
otherwise it will not treat the sub folder as an application and will follow parent folder’s web.config and other settings

Deploy asp.net on IIS 8

I'm trying to deploy a asp.net site on iis 8 but i'm getting an error.
Site is working in visual studio, deployment is done without error using a custom profile with file system as publish method. (Here is actually my first question, should I use file system?)
Build->publish site->(Custom profile, file system, release)
Well, the site is added to selected folder which I've set up in IIS. I host several php pages from this folder whithout problem. But when I try to url forward to the new site I get this error: Given URL returns 500
I'm using IIS8, .tk adress through a dlinkddns.com adress
Any ideas?
Edit: added picture
What should I choose here if i'm hosting the page on the same computer? (I tried File system for now)
The error I get when I'm opening default.aspx
To deploy a website into IIS8 from Visual Studio, use 'File System' instead of 'Web Deploy', and put in the directory of where you want to publish your site.
Right-click your site name on your IIS 8 manager, select 'Add Application', and select the folder where you published your website in your physical path.
Click on the application under the website, then click browse, and you should view the website on your browser.
You can look at my question on how to create new website under the title, 'New website not showing default page in IIS 8.5'.

Getting You do not currently have a default Web page established for your users. when running VS2008 solution

I have website in VS2008. Created the Virtual directory in IIS 5.1. When I try and run the site to debug from Visual Studio I keep on getting:
Your Web service is now running.
You do not currently have a default Web page established for your users. Any users attempting to connect to your Web site from another machine are currently receiving an Under Construction page. Your Web server lists the following files as possible default Web pages: default.htm,default.asp,index.htm,iisstart.asp. Currently, only iisstart.asp exists.
To add documents to your default Web site, save files in c:\inetpub\wwwroot.
I have no idea why this is happening.
Can anyone help me?
If I understand correctly, it may be as simple as this:
In Solution Explorer, right-click on the page you want to be the default page and click "Set as Start Page".

Resources