How to deployed Mvc Application on shared-hosting Server? - c#

I My Web site on a HELM Control Panel. I developed my web site on MVC.But My Hosting Provider having a Following components installed on That Hosting Account framework 3.5 and IIS6. But I am Unable to Run My site it display me Page not found error.

The problem will be that you're running under IIS6 and if its on shared hosting you're unlikely to have sufficient control to make MVC run without "cheating" a bit.
Under IIS6 requests are only routed to the ASP.NET handlers (I don't promise to get the terminology right) if they have the right extension (.aspx, .asmx, .ashx, etc) with a nice MVC URL there's no extension at all so it doesn't get see by ASP.NET and hence the request won't hit the routing within your MVC app and so you get page not found.
Under IIS7 everything (ish) goes through the ASP.NET handler and so it just works.
So a couple of links to help, here's a stackoverflow question:
ASP.NET MVC on IIS6
and here's Phil Haack on the subject:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
Hope this helps.
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

Related

Publishing ASP.NET application using third party hosting

I have developed an ASP.NET C# Web application with 2 web forms and I have purchased a domain from Fasthosts in order to host my site. I have changed the server to be Windows-based and used the correct ftp details to upload my app to the site. The only problem I am having is that when the site is published I am receiving this error.
I am hoping that this issue is fairly easy to resolve. Any help on what I can do to get around this issue would be much appreciated. Thanks:)
Since you have not provided details of any set up using IIS, I would imagine that your issue is that you have simply deployed the file and gone to the URL expecting the site to be there. Normally you'd have some setup to do, unless they are handling that for you?
Have you make sure that you have setup your default page? Do they support .net core? Maybe this post https://windowswebhostingreview.com/troubleshoot-403-error-when-publishing-asp-net-core/ can help you.

How to host ASP.NET MVC website on Hostgator

I have created website with ASP.NET MVC and I need to host it in Hostgator. I search on google and youtube for directions about that but I didnt find anything, just host wordpress, wordpress and wordpress, nothing for ASP.NET MVC applications.
This looks very unusual because I read many articles that evaluate Hostgator as one of best ASP.NET hosting service.
Can you help me please ?
I think that is because your host server is linux not a windows,so that you do not have an access to asp.net

ASP.NET Core 2.0 Web API IIS Hosting and Debugging

I have a ASP.NET Core 2 Web API with the Angular 4 front end SPA application. It was created using clean Core 2 Web API template in VS2017 and angular-cli for the front-end using VSCode. Currently I can successfully run my prototype using either IIS Express WebAPI or self-hosted. I can successfully deploy to IIS using steps simmilar to these: https://learn.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x. However, I can't figure out how to attach to the IIS process to be able to step through the code as I used to do with regular old Web API or MVC app hosted in IIS.
I'm coming from traditional Web API and Angular1 environment. Both ends were deployed to IIS and it was a simple process to attach to IIS for troubleshooting. So, maybe it's a stupid question, but I can't seem to find good resource on how to approach production deployment of such Core 2 WebAPI + Angular 2 SPA app. What are the best practices? IIS for Web API and npm for client? Can someone maybe point me to tutorial on how to do that and how to debug/troubleshoot with IIS? Are there a better ways to deploy/host it, maybe my approach is wrong and IIS not needed?
If any pictures, code, setup is needed I'll gladly add it to the question. I just don't know what I can provide at the moment. Any help, advise, link will be much appreciated!
Not 100% sure if this is what you're after, but check out this blog-post:
https://blogs.msdn.microsoft.com/webdev/2017/07/13/development-time-iis-support-for-asp-net-core-applications/
Note: Make sure you select the new launch profile ("IIS") in the main window, before starting a debug session!

Deploy ASP.NET MVC application in IIS

I have planned to develop a web application using MVC, can any one suggest me the how easy to deploy the application on the IIS?
And also let me know the steps to that.
regards,
Satish
Just publish your application either to your server directory or locally and copy it to the the destination server. Make sure your server is configured for MVC, see below:
Using ASP.NET MVC with Different Versions of IIS
Server installation options for ASP.NET MVC 2
as rick says, and also, make sure (if IIS6) to use wildcard mapping - this needs to be added in the IIS control panel. again, our old friend google should throw up plenty of options on doing this. if you're under shared hosting, you can request it and most are happy to add it.
jim

Using SEO friendly URLs in ASP.NET

I am in a situation where I want to restructure my site's urls. That is I have a page that lists the article names (with each article name as a link). As shown below:
ARTICLE1
ARTICLE2
ARTICLE3
Now if I click on an article I want the url to be as follows:
www.domain.com/ArticleID/name-of-the-Article
The term your looking for is "url rewriting" or "routing".
I think the easy way will be to use the ASP.NET MVC routing, it works with Webforms too:
Using Routing With WebForms
Routing with ASP.NET Web Forms
I think you're looking for URL Rewriting, I'd also recomend UrlRewritingNet.
Other possibilities that have worked well:
If your site is hosted on Windows Server 2008, you can use the Microsoft URL Rewrite Module for IIS 7.0.
A nice tool for older servers is Isapi Rewrite (look here - there's a free light version), very similar to Apache style mod_rewrite. May be a problem in shared hosting environments unless the provider is willing to install an Isapi dll.

Categories

Resources