I have registerd my own domain name and web hosting space too on parallels
thay are having there plesk control panel.
I know that for html pages I need to copy my all pages into httpdoc folder
But what about by MVC WEBSITE?
HOW DO I HOST IT?
CAN ANYONE HELP ME?
To expand on the previous answers;
You need to ensure you are copying your websites 'bin' folder.
You may also need to ensure that the MVC assemblies are in it.
When you installed MVC on your local machine several assemblies are registered with the GAC.
It may be that your host does not have all the required ASP.NET MVC assemblies installed; if not then you will see a configuration error.
As these assemblies are registered in the GAC, the bin folder will not contain them by default.
Make sure your project explicitly references the following DLLs and make sure the Copy Local property is true.
System.Web.Helpers
System.Web.Mvc
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Deployment
System.Web.WebPages.Razor
Microsoft.Web.Infrastructure
Rebuild your project and check the bin folder. These files should now be present.
Upload the contents of this folder to your host.
you have to copy the whole mvc project into httpdocs folder to view it online.
You are getting the 500 - internal server error may be because the mvc version differs in the server(i mean may be you are using mvc v4 and the server has mvc v2).
So just contact your hosting provider, i am sure you will get a good solution.
I had the same problem with an MVC5 app using ASP .NET 4.5. To solve it, I used the Visual Studio publish Tool (Image1) right clicking in the solution explorer.
Then the Web App was published successfully.
you copy the whole project into httpdoc , then u must enable wildcard ASP .NET mapping for the website , ask your hosting system admin , usually they can do that
I'd suggest (from Visual Studio) using the Publish utility to actually upload your website. Plesk Hosting offers support for Web Deploy which is probably your best option, or alternatively you can pick FTP. When you use Visual Studio's publish, it should (I think) include the dependencies you have (in case you had anything in the GAC)
Select the following assemblies:
System.Web.Mvc
System.Web.Routing
System.Web.Abstractions
In the Properties window, set Copy Local to True.
then upload bin folder in mvc to the server. this may fix the issue
Related
I'm new to .NET core. We're currently implementing an Umbraco9 site which is running on .NET core 5 (MVC). Normally when setting up a development environment on a regular .NET site, I would create the project, point IIS to that same folder, and create a host entry for something like "local.mysite.com" I would then just be able to load up that URL in my browser and the site would serve, simply building when changes to back-end code were needed.
With .NET core, there are obviously some significant differences. For starters, there is a new wwwroot folder inside the project. So, in this case, I've tried pointing my IIS site to that wwwroot folder. This then has the impact of requiring a visual studio publish to that folder for any change front-end or back-end. Furthermore, it seems as though .NET core compiles the cshtml files into a Views.dll file, but when I publish the site, the site throws a 500 unless I manually copy the cshtml files to the wwwroot folder (which also has its own wwwroot after publish).
I've done loads of research on what the generally accepted best practices are with developing and hosting .NET core, but haven't come to a conclusion on this. Further complicating this is that I've seen some information saying that you can use Kestrel in conjunction with IIS. So now it's a matter of Kestrel vs. IISEx vs IIS. I'd prefer IIS as I'd like it to match production.
I've tried setting my IIS path to the path of the VS project, but I get "web server is not configured to list the contents of this directory." I enabled directory browsing, but this of course just lists the files in the directory. I've installed the hosting bundle as well.
The question: Is there a set of generally accepted practices on how to setup local development environments for .NET core projects? I'm really looking for some guidance on .NET core from a non .NET core developer's perspective. I'm trying to make this question as focused as possible, but I feel like there's a gap in my understanding of "old .NET" vs. .NET core and I'm hoping to get some guidance to help fill in that gap.
I wasn't able to get this figured out, so only solution I can come up with is to point IIS at a separate publish folder and publish to that folder when I need to make changes.
I'm connected to a customer's site. There is a bug in an ASP.net MVC site i'm trying to solve.
As i make changes in the various .cs files, the web-server is not changing it's behavior. It seems that the web-site is determined to use the pre-compiled .dll files in the Bin folder.
How can i instruct IIS to recompile the web-site from scratch, in order to pick up the live changes?
I tried deleting my own .dll file:
\Bin\Contoso.dll
But then the web-site crashes.
Note: i am asking how to do this without access to Visual Studio; otherwise i would have changed the web-application into a web-site and redeployed.
You will need to recompile the dll with your changes from your development machine and deploy them. MVC ( I mean asp.net application) uses dll not source code. In short , what you are asking is not possible.
I created an ASP.NET MVC4 application using C# on Visual Studio 2012. But facing a hard time deploying it. I uploaded all the folders of my project onto my server (godaddy). But still cant view my website running.
My question: Is this enough to deploy my site ? Or anything else needed?
You can bin deploy an MVC4 app to GoDaddy.
Just copy the relevant MVC4 related DLLs that you need to your production bin directory.
Alternatively, you can set "Copy Local" equal to "true" in the Properties window for any of your MVC4 related project references as described in this blog post. Then when you do a Publish of your application, all of the needed assemblies will be included automatically.
You probably won't need all of these, but in an MVC4 app I currently manage on GoDaddy, I needed to manually include the correct versions of DLLs for:
System.Web.Abstractions.dll
System.Web.Helpers.dll
System.Web.Mvc.dll
System.Web.Optimization.dll
System.Web.Razor.dll
System.Web.Routing.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll
sure, you can deploy your MVC 4 application. Godaddy supports MVC 4.
What I have done to deploy my MVC 4 application is:
1. I included DLLs such as:
System.Web.Mvc
System.Web.Routing
System.Web.Abstractions
2. I edited web.config file. I put next strings:
<system.web>
<trust level="Medium"/>
.....
</system.web>
3. Then I used the File System publish method and then I used FileZilla to transfer the files to the GoDaddy. I copied all files to httpdocs directory. You must copy just to *httpdocs directory.*
That's all. Good luck.
I am building a web application with .NET 3.5. I have several class library projects being referenced by my web forms.
I am deploying using a web setup installer.
When I install the application and hit the opening page, I get null pointer exceptions to some (not all) of the objects in my class library. Looking at the stack trace reveals that something somewhere is looking for a directory that exists only on my development machine.
When I do IISRESET, the errors vanish.
Does anyone have any idea why my application (web.config is compiled with debug="false") is attempting to look for things on my local dev machine?
My active build is set to release.
Thanks.
Did all the .dll's you used in your site get published with your code? If not make sure they are placed in by the installer, and the web config is not hard coded to look for references.
Open Visual Studio, look at the References folder and check to see if any of those references are pointing to the file(s) in your DEV machine. If so, I suggest you add a new folder to your app (i.e. Assemblies) and add all the dlls your application references in that folder.
After that, make sure all the references in your project are pointing to the dlls in the Assemblies folder and not some folder that only exists in your DEV machine.
We've implemented some SOAP client code on our ASP.NET site that calls up a remote service. Implementation was basically done by using Visual Studio "Add Web Reference" wizard, adding proper 'using remote.service.namespace' to the code and calling the service.
Code works perfect locally(from Visual Studio), but fails on production web server with missing assembly reference error:
CS0246: The type or namespace name 'remote.service' could not be found (are you missing a using directive or an assembly reference?)
I have a sneaky suspicion that I am not deploying everything properly, maybe some one can point out what is that I am missing there?
Thanks!
Additional info:
Project is a Website.
ASP.NET version 2.0 installed and used as a target on both dev box and production server.
Proxy file generated by WSDL.exe is deployed into the root folder of the website, same folder where the page resides. Global namespace(default) was used for proxy class generation.
If this is a WebSite project, then the proxy file should reside inside the App_Code folder
You mentioned the proxy dll is placed on "the root folder of the web site, where the page resides".
You should place the dll inside the "bin" folder. If the folder is not there create it.
The Web Service client stack in .NET does runtime generation of the proxy client (from the annotations in the class generated by wsdl.exe/svcutil.exe). this generated file typically ends up in one of your servers temp directories (there's one under the main windows tree somewhere). The problem is that the ASP.NET user account doesn't have rights to write to this particular temp directory, but doesn't notice at the time it writes the file, so you end up with an error with it trying to load the generated file back. You can end up in the situation depending on the exact installation order on your server. Once you find the right directory you can simply fix the NTFS perms on the directory to solve the problem.
Did you copy the App_WebReferences folder and all its contents to the server?
Does other parts of your ASP.NET site work?
Does your site target 3.5 and possibly 3.5 is not installed on the production server?
Is this a Web Site, or a Web Application Project? I bet it's a Web Site.