I've been trying to debug this ASP.NET cloud project over LAN, because we need it for testing at work. I have done plenty of research on the subject, but I simply cannot get it to work as expected. I think I have narrowed the problem down to being that, the project is a cloud service project.
If I create a new ASP.NET MVC project, without the cloud service, it works just fine, when editing the projects bindings, plus turning off the firewall of course. If I then do the same procedure, but with a cloud service project, with the asp.net mvc as the web role, I get "connection refused" when trying to access it over LAN.
Does anyone have any idea what's going on and/or how to solve it?
Bindings:
<bindings>
<binding protocol="http" bindingInformation="*:5807:localhost" />
<binding protocol="http" bindingInformation="*:5807:*" />
</bindings>
I spent almost a full day at work with exactly the same issue.
It finally started to work after I reïnstalled IIS express.
Uninstall at Programs and Features
Download the Microsoft Web Platform Installer found at link below:
http://www.microsoft.com/web/downloads/platform.aspx
search for IIS express, and install it.
After that, it worked like a charm for me. I hope it works for you as well, because I wasted way too much time on this problem...
Related
First let me say this used to work in Visual Studio 2015 but I am having the a darn hard time getting it to work in Visual Studio 2017.
I have a WebAPI project running in Visual Studio 2017. I have edited the applicationhost.config file in the …\ProjectName.vs\config file so it has the following entries for my project.
<bindings>
<binding protocol="http" bindingInformation="*:56952:localhost" />
<binding protocol="http" bindingInformation="*:56952:192.168.1.155" />
</bindings>
My firewall is completely disabled. When I try to run my Xamarin forms project on a Win10 Mobile V10.0.15254.0 emulator my app does not connect to the WebAPI. (I get the standard "The text associated with this error code could not be found. A connection with the server could not be established."
If I launch Edge on the emulator and try to access any of my local servers on the network using IP address, that works. Can someone enlighten me with regard to what has changed and how I can now make this work?
So the issue was the IP address I was using. Here are the steps I used to resolved this:
I launched my Windows 10 mobile emulator.
Click on the >> (Tools) icon in the tool bar of the emulator.
Click on the Network tab of the Additional Tools window.
I looked in the list for the network adaptor labeled Desktop Adaptor #1 and copied the IP address.
Edit the Applicationhost.config file in the folder of the WebAPI project.
Find the entry in the file for site name="XXXXX" where XXXXX is the name of the Visual Studio project you are hosting your WebAPIs in.
Within the <bindings> section of the entry for your WebAPI project, add a binding for the IP address you copied from in step 4. It should look something like this:
<binding protocol="http" bindingInformation="*:56952:169.254.69.220" />
Where 56952 is the port my IIS Express is hosting the WebAPIs on and 169.254.69.220 is the IP address I copied from step 4.
After adding this, I was able to connect to locally hosted WebAPIs in IIS Express.
Hope this helps.
This is my second deployment to Azure.
First was a simple MVC4 Website with a Database, which I deployed via git. Worked like a charm.
Now I've got the following:
A solution containing three projects.
Web -> Which is the MVC4 Frontend
Models -> Contains the Models and the DB Context
Backend -> MVC4 Project for data administration
All projects are MVC4 (didn't know how to manage this better for the Models project).
In my models project I'm running the code-firt migrations.
The backend is running in the virtual directory: localhost:80/Backend
(works perfect on localhost)
Both the Web and Backend project have references to the Models Project.
Folder structure:
Solution folder contains:
Web / Models / Backend / MySolution.sln
The first time I deployed I've created a git repo in the Projects folder (cause it was a single project). Now my repo is in the solution folder.
I'm also uploading files in the Backend and move it to the other project (Web) via the following path:
Directory.GetParent(HttpContext.Current.Server.MapPath("~")).ToString() + DirSeperator + "Web" + DirSeperator + "Store" + DirSeperator;
Is this going to a problem on Azure?
So my loose question is now, how am I deploying this solution?
I've created a Website with Source control in Azure and added a SQL Database to it.
I've managed to push the solution to Azure,
but on Azure there's the messsage
Found solution ... with no deployable projects. Deploying files instead.
now.
Do you have any good tutorials for me on this problem?
Am I doing it completely wrong? (I think so)
I'm relatively new to ASP.NET and Azure, so it's a bit hard for me to understand.
Thanks,
Tobi
Followup Edit: I see now, this has more to do with configuring 2 project deploys. You will need to create deployment scripts
I'm not done doing research, but take a look at these posts:
http://blog.amitapple.com/post/38419111245/azurewebsitecustomdeploymentpart3
http://kellyhpdx.wordpress.com/2012/04/11/deploying-multiple-web-applications-to-a-single-azure-instance-and-applying-web-config-transforms-correctly/
I've managed to solve my problem.
Sorry, that I'm answering my own question - hope this doesn't offend anyone.
What I wanted to achieve is not possible with Azure Web Sites, but with Web Roles.
As seen here on CloudCover and on StructureTooBig.
So I've created a new Azure Cloud Application (provided by the Azure Tools) in Visual Studio, with a default Web Role, which is my Web Frontend project.
I've added a VirtualApplication to the Web Role with the name "backend" and the physicalDirectory set to my Backend Project path.
Then I've added a VirtualDirectory "store", which I could access from both projects for file uploads.
My WebRole looks like this now:
<WebRole name="MvcWebRole1" vmsize="ExtraSmall">
<Sites>
<Site name="Web" physicalDirectory="[projectpath]">
<VirtualApplication name="backend" physicalDirectory="[projectpath]">
</VirtualApplication>
<VirtualDirectory name="store" physicalDirectory="[projectpath]">
</VirtualDirectory>
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="Diagnostics" />
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
I'm accessing (read+write) the store now via:
HttpContext.Current.Request.MapPath("/Store" + DirSeperator);
instead of
Directory.GetParent(HttpContext.Current.Server.MapPath("~")).ToString() + DirSeperator + "Web" + DirSeperator + "Store" + DirSeperator;
Which works perfectly on both projects.
So, this solution works and I've already deployed it to production!
Emerging problems:
Web Sites work with git integration, but Cloud Services won't (this is very bad for my workflow).
The deployment takes about 30-45 minutes. Holy ...
I've had to publish everything again to activate Remote Access and WebDeploy features. And I hope, WebDeploy is going to save time for deploying updates ... as everytime I'm updating now, the complete solution is replaced on server (within the mentioned time span).
Is there a way to access the data via FTP?
Ciao
I ask this under the pretense of LightSwitch as that is what I am trying to deploy even though I have a sneaky suspicion that it has nothing to do with it.
If I have Authentication Enabled in any form on any App Type for LS I get the
"Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound."
I have the LS Pre-reqs installed on a clean ms08 Server. I used Web Platform to install almost everything. I have installed Fiddler2 and I am guessing I am not using it right as all it says is that GET /EpistemeAdmin/Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo HTTP/1.1
Is moved, renamed, or in-accessible.
I deployed the site through Web Deploy and it has it's own App Pool. Only Windows Authentication is enabled.
I understand this seems more like an IIS issue so maybe this should go to ServerFault but I thought I'd try LightSwitch angle first in case others had encountered the same thing.
Had the same issue on Windows 2012.
Had to enable http activation under WCF under the .NET 4.5 feature.
I found the answer on another thread --> http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/a2650616-1b68-4ae9-9ffd-f4f2a1211254
I simply repaired the .NET 4 Client (on the IIS Server), restarted and BAM!
Thanks
In case somebody having the same problem:
The first line in my web.config was
<add key="UserCodeAssemblies" value="Application.Common.dll;Application.Server.dll;Application.ServerGenerated.dll"/>
after switching to:
<add key="UserCodeAssemblies" value="Application.Common.dll;Application.Server.dll;"/>
the problem went away.
Way to debug this:
publish your lightswitch to a folder. Unzip and open the web site using visual studio.File->open->website
I'm having a problem with deploing my solution to Windows Azure.
I've created a basic ASP.NET web role and tried to run that against my local DevFabric and everything is running perfectly. The ASP.NET site is reachable via a browser, I can see the valid results of executed code and everything is perfect.
Later on, I tried to deploy that to Windows Azure, the exactly same solution that I run against my local fabric and it was deployed successfully. Azure "told" me that the solution is ready (the green icon).
When I try to reach my service's url, I'm getting 10060 timeouts, as if the url is not reachable at all. This is for both, the staging and production environment.
I tried to look into the diagnostic logs, but there is nothing mentioned about any problems, moreover, the traces created by my application are written to the WADLogsTable, that indicates that the application is actualy running and it executed (at least some of) my code, but it's it's not reachable via the browser.
What is wrong with that, or what I'm doing wrong?
Service definition:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="CloudServiceX" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WebRole name="WebRole1">
<InputEndpoints>
<InputEndpoint name="HttpIn" protocol="http" port="80" />
</InputEndpoints>
<ConfigurationSettings>
</ConfigurationSettings>
</WebRole>
</ServiceDefinition>
Check for HTTP/HTTPS endpoint is enabled in your web role
I contacted the Azure team and they told me that they had network-related issues inside their data center.
Call the support and they should resolve the problem for you.
I am researching a new ASP.Net project that we would like to host in a Windows Azure Web Role.
One of the technical requirements of this project is to make use of the full pre-compilation options (non-updatable, single page assembly) of the ASP.Net Web Site project model - as opposed to the ASP.Net Web Application project model.
Is it possible to host ASP.Net Web Site projects in Azure? Best I can tell the project templates for Azure are ASP.Net Web Applications only at the moment.
Okay, I was struggling with the same problem for couple of days, here is the step-by-step guide
(1) Publish your website project to a folder (for my case is "PrecompiledWeb\WebSite1", which resides in the sub folder of my azure project)
(2) Modify your service definition(.csdef), adding a webrole
<WebRole name="WebSite1" enableNativeCodeExecution="true">
<InputEndpoints>
<InputEndpoint name="HttpIn" protocol="http" port="80" />
</InputEndpoints>
<ConfigurationSettings />
</WebRole>
(3) Run the following command(CSPack) at command prompt
cspack
CloudService1\ServiceDefinition.csdef
/role:WebRole4;WebRole4
/role:WorkerRole1;WorkerRole1\bin\Debug;WorkerRole1.dll
/role:WebSite1;PrecompiledWeb\WebSite1
/out:CloudService1.cspkg
/generateConfigurationFile:"ServiceConfig.cscfg"
(4) Basically you are almost done!
Good luck! ;)
The short answer is yes, but it isn't easy.
One of the cool things about Azure is that almost anything copy-deployable can be deployed to Azure. As such you web site project can be deployed. The difficult part is that the Visual Studio tools don't currently (and may not ever) support it. You'll need to use the CSPack command line tool to package your deployment.