MVC upload to the US Orange Cloud Virtual Machine Series Problem Solving method _ practical skills

Source: Internet
Author: User
Tags html page versions

I wrote a small web site with vs2015,. Net Framework4.5, MVC 5, published to native IIS Normal, a cloud virtual machine was applied in orange, some problems encountered during the publishing process were recorded as follows:

1, server-supported version is relatively low

After uploading, open the website display:

HTTP Error 404.0-not Found

The resource you are looking for has been deleted, renamed, or temporarily unavailable.

Asked about the technical support of the Orange, said only support to. NET framework4.0, Mvc4.

There is no way to try to lower the version. In vs2015, all the project target frameworks in the solution are changed to. NET framework4.0, the MVC5 is unloaded in the NuGet, the MVC4 is installed, and a bunch of bugs occur immediately, especially in some extended classes of the entity class.

[MaxLength (128, errormessage = "Typical customer length cannot exceed 128 characters")]
are not recognized. There are a lot of inconsistent versions of the referenced libraries.

2, missing some DLL files

So it's just a vs2012, a solution in vs2012, a selection of ASP.net MVC4 Web applications, a target framework for. NET framework4.0, a controller home, a view index, after the local pass, Then upload to cloud virtual machine, still 404 error.

And the technical staff of the United States and Orange, the other side to help me open a detailed error.

I joined in the web.config.

 <system.web>
  <customerrors mode= "Off"/>
 </system.web>

Visit the website again, the prompt cannot load ...

So follow the prompts, respectively uploaded: System.Net.Http.Formatting.dll, System.Web.Http.dll, System.Web.Http.WebHost.dll, finally can see my view.

3, add ueditor after the Newtonsoft.json version problem

Re-build each project with vs2012 and copy each project from the original vs2015 solution.

After copying the plugin ueditor, run it all the time: failed to load file or assembly "Newtonsoft.json, version=4.5.0.0 ... , and then look at the Newtonsoft.Json.dll in Ueditor\net\bin, the version is 6.0.2.16931, I remove the reference, and then refer back to Packages\newtonsoft.json.4.5.6\lib\ The Newtonsoft.Json.dll in NET40, however, and then look at the referenced Newtonsoft.json attribute, still ueditor\net\ Bin in the 6.0 version of the Newtonsoft.json, I am a bit confused, why does the re-citation not take effect?

After a lot of trouble, finally by modifying the Web.config file

 <!--resolved after joining Ueditor, the prompts failed to load the file or assembly "Newtonsoft.json, version=4.5.0.0 ...-->
 <runtime>
  < assemblybinding xmlns= "Urn:schemas-microsoft-com:asm.v1" >
   <dependentAssembly>
    < assemblyidentity name= "Newtonsoft.json" publickeytoken= "30ad4fe6b2a6aeed" culture= "neutral"/>
    < BindingRedirect oldversion= "0.0.0.0-6.0.0.0" newversion= "6.0.0.0"/>
   </dependentAssembly>
  </ Assemblybinding>
 </runtime>

This problem is resolved by pointing all versions of Newtonsoft.json to the current 6.0 version.

4, 401.3 Error

VS2012 write the program, in the local debugging through, and then upload, visit the site 401.3 error, should be a permission issue, and then please orange technology processing, static HTML page can be displayed, but Home/index still cannot open, also does not show detailed error prompts, Add in Web.config according to the method found

 <system.webServer>
  <validation validateintegratedmodeconfiguration= "false"/>
  <!-- After uploading to the cloud virtual machine, you must add this configuration item to open the Web page-->
  <modules runallmanagedmodulesforallrequests= "true"/> 
 </ System.webserver>

Finally see the file can not load the details of the prompts, and then upload the three files to the bin, then visit the site, and finally can run normally.

5, or to praise the U.S. orange Technical support staff, answer, solve the problem very quickly and patiently.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.