WCF RIA Services Domain Service not found when debugging with Windows Azure cloud project - azure

I am trying to debug a Windows Azure Cloud project locally with Visual Studio 2012 running the Windows Azure SDK 1.7 on a Windows 8 PC with IIS 8 Express. The cloud project includes a Web Role running an ASP.NET MVC 3.0 web project that includes WCF RIA Services that in turn links to a Silverlight project hosted on that web site. When I run the web site directly and do not try to debug the Azure cloud project I am able to access the web site and the Silverlight application and the RIA Services are accessible with absolutely no issues. If however I debug the Azure Cloud project the emulators start up and the web site comes up. I am able to then access the Silverlight application but when it tries to make a request back to the WCF RIA Services Domain Service I receive an error from the IIS Server stating that the domain service is not available. I then try to go directly against the WCF RIA Service endpoint to see if it will come up outside the Silverlight application and again I receive a 404 Not Found response when going to the *.svc endpoint.
I have gone through various searches to try and resolve the issue and I have used Fiddler to ensure the network requests are not having any issues. I have not been able to identify any problems. I also tried turning on WCF tracing to see if any errors comes up, but the trace files are not even updated when I debug through the Azure Cloud project.
After repeatedly getting this behavior I have attempted a complete re-install of Visual Studio 2012 and the Azure 1.7 SDK, but I still get the same behavior. Does anyone have a suggestion of what the issue may be or how I might try and track down the issue, since the WCF tracing is not offering me any additional information?

Strange. Could you try this sample project, which is quickly created with VS2012 on W8 using IIS8 Express, .NET 4.0, MVC3 hosting Domain Service and Silverlight consuming that domain service. Everything works just fine.
If that project runs at your environment fine - then it might be some missconfiguration of your web.config/global.asax file. If that project also fails in your environment - then it might be something very messy with the environment.

Related

Azure WebApp PageMethod fails

I have created a Azure Web App and published my application from Visual Studio and I can access the website as expected. However, the aspx web pages in the website use calls to PageMethods using the asp.ScriptManager. All works fine if I host through IIS on a web server but any calls when hosted as an Azure Web App returns "Object doesn't support property or method....".
After some more investigation, I get 'Sys' is undefined and checking the network monitor, WebResource.axd and ScriptResource.axd return a 404. Odd
Does Azure not support this? Or am I missing some configuration?
Found the solution. I was running the WebApp in Classic mode. Switched to Integrated mode and the script files are delivered.

Web API Dependency Resolver in Windows Azure Web Sites

After publishing a project with WebAPI to Windows Azure Web Sites, I started getting exceptions tossed complaining that my API controllers didn't implement a default constructor.
I'm using Ninject in my project, and when I explicitly register the NinjectDependencyResolver in my GlobalConfiguration, the issue in Azure is resolved.
What I'm puzzled by is why I don't encounter this issue on my local development machine. Can anyone explain the configuration different in MAWS that causes this extra step to be necessary?

Web Deploy from Visual Studio 2012 to a remote IIS 8 server

I have a remote Windows 2012 server running IIS 8 from which I am hosting a web application. My local development box is running Visual Studio 2012. Currently I am publishing my app as a web deployment package (.zip), RDP'ing to the production server, copy + pasting to a folder and deploying the application from within IIS. My question is, what changes do I need to make to deploy directly to IIS from Visual Studio 2012 using the web deploy option?
I have tried to follow this guide but it refers to a service URL which I must obtain from my hosting company. I don't have a hosting company, my server is co-located.
I am presented with the following options:
Is the username and password the one I use for the RDP account? I already have Web Deploy 3.0 installed on IIS do I need to enable further settings?
OK I found the solution but it took me a whole day to get it working! Basically the steps are as follows. This is very sketchy but see the detailed guides below which helped me.
Enable the IIS Web Management role feature.
Install Web Deploy 3.0 (or higher). Make sure to customise the install to include the handlers (See notes below). If you're not presented with this option go to add/remove programs, find webdeploy, right click and select "change" option.
In IIS click on the server node and find the "Management Service" icon. Enable remote access and configure a dedicated IIS User for remote deployment (These will be the credentials that will go in the user name and password boxes).
At the site level in IIS assign this user to manage the website.
Make sure port 8172 is open on the web server (you can check this port here).
Try reconnecting from Visual Studio. There was some trial and error here for me but the error messages do link to a MS guide for decoding :)
Even after connecting successfully I had to wrangle with permissions, so my IIS user had sufficient privileges to create the app pool, directories and general file management jobs.
The following links really helped!
Configuring the handler on the web server:
http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler
Connecting via Visual Studio:
http://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx
NOTES:
To ensure the handler is running, login into your IIS server and point your browser to the following URL.
https://<servername>:8172/MsDeploy.axd
F12 to open up the dev tools to see the HTTP response. Also MsDeploy also creates IIS logs in inetpub/logs which should give you some clue if you're having connectivity problems.
I had the same problem and this post was very useful to help me solve the issue. I had anyhow serious troubles while trying to install Web Deploy on my Windows Server 2012. The installation of Web Deploy 3.0 was giving me several errors and it couldn't be completed.
I tried to solve the problem installing "Microsoft Web Platform Installer 5.0" from http://www.microsoft.com/web/downloads/platform.aspx but it didn't solve it.
I thought it was due to Firewall Settings, Authorizations issues, Users without permissions or something like that. Finally I found out it wasn't due to any of the mentioned reasons.
I found the most simple solution and I hope it will help other users too: it was enough to download Web Deploy 3.5 installation directly from Microsoft Website:
http://www.microsoft.com/en-us/download/details.aspx?id=39277
This may sound banal but it solved it. I was able to install "Web Management Service" but not the second needed IIS service "Web Deployment Agent Service".

NServiceBus 4 with Windows 8 and Azure WebRole Issue

Running a webrole that is using NServiceBus 4 hangs when running in the local emulator. I have duplicated this on several windows 8 machines. Works fine on Windows 7. It appears that the only way to get it to run is to change the azure project (web settings) to "Use IIS Web Server." I am running Windows 8 and Visual Studio 2012 and Azure 2.0 SDK.
Here is how you can duplicate the problem by working with the PubSub sample from here:
http://particular.net/articles/windows-azure-transport
Build the project and run it to verify that it works out of the box
Now change the Web settings by right clicking on the azure project and Selecting the "Use IIS Express" option on the web tab.
Run the project now
The web role will simply hang. Any ideas? Running under IIS Express is preferred for many reasons.
there seem to be some known issues with IISExpress and Azure. Could you have a look at these pages and see if they help
Can't get azure web role to run locally using the emulator
Workaround for IIS Express Crashing When Running Windows Azure Cloud Service Web Role

Access Azure Development Server From VM?

We are developing an application that we are deploying to Azure. It needs to work with a specific machine configuraiton. We we have this configured as a VM which developers can run locally.
However to test the VM configuration we need to publish to Azure and access it on a live Azure instance. Is there anyway to allow a local VM to get access to the Azure environment IIS on the developers machine? It doesn't seem to show up in IIS Express so I guess it isn't the same as a normal site?
Also is it possible to configure an Azure environment locally for testing. We want to host test applications for internal use and don't want them run on developers machines. We would like to run them on a server in the office.
Any ideas?
Thanks
I think that the answer to this question will outline the general guidelines you could follow to enable your environment.
Windows Azure Emulator has its own load balancer simulator which bind to socket 127.0.0.1:81 (most of the cases, if port 81 is free). If the Azure project is developed with Azure SDK 1.3 or later with Full IIS enabled, then the Azure Emulator (for versions 1.3 ~ 1.6) will use local IIS to host the sites. IIS Express is not involved in any way with the Azure project. If you happen to run IIS Express, then most probably you have set up your web application project as a StartUp project in the solution. The correct way to locally debug Windows Azure applications is to use the Cloud Project as a startup project.
Please kindly update your question, if there is some doubt or confusion after checking the mentioned related question.

Resources