简体   繁体   中英

Solution with web project and web service deployment to azure

I have one project solution in which I have one web project and another project is service. Now if I run it locally, it is working fine without any problem but when I deploy it on to cloud (azure specifically), its looks up and starts running but moment it tries to access the service which is used for log in mechanism it is showing an error.

As I don't know how to trace it on to azure, I'm unable to find actual root cause of it.

While publishing it to azure, I have just marked my main project into web role. Do I need to add anything else in web role node while deploying package to azure?

To perform diagnostics during development, one useful technique is to activate Remote Desktop on the cloud instance and connect to the server to check the event logs for errors.

If you have Visual Studio Ultimate, you can also use Intellitrace to collect debugging information on the published cloud service. See Debugging a Published Cloud Service with IntelliTrace and Visual Studio .

You can also debug locally using the emulator. See Debugging a Cloud Service in Visual Studio .

As for your project architecture, you have a few alternatives:

  1. Add a web role for each project; ie, one web role for the web project and another web role for the service project. This will create two instance groups, and one of this roles will be assigned the TCP port 80; the other role will be assigned another port such as 8080.
  2. Add both project in a single web role as distinct web sites. See Configure a Web Role for Multiple Web Sites , Tips for Publishing Multiple Sites in a Web Role , One Azure Web Role, Multiple Websites .
  3. Reorganize your solution so that you have a single website project that also has the service definitions, and keep the service implementation in a separate class library project. This way you would have one web role and one web project with both the website and the services.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM