I'm stumped. There are several threads out there that reference a similar problem, but not the same one. I'm trying to get a simple WCF service up and running in Azure, but my problem is happening before I even deploy. I'm following this article:
https://azure.microsoft.com/en-us/documentation/articles/cloud-services-how-to-create-deploy/
Which says to create your project, build the "Hello World" service interface and class, and then start your project locally. I get a 403 error when I try to start my project.
The only step I'm not following exactly is that I don't have a "Start Without Debugging" option (I'm using Visual Studio Express Web Developer), so I just push "Start Debugging."
Why would I get a 403 error on my own machine? I am running Visual Studio as Administrator.
On the WebRole project right click on your .svc (Service1.svc) and choose "Set As Start Page" And then run the project. Make sure to do this on the WebRole project not the Azure Cloude Project.
Is the Azure project the default project or is the WCF Web Role? If it's the role itself, that may be your issue - it's trying to access the root of virtual directory containing the web service versus running the cloud app in the local emulator. If you browse to http://127.0.0.1:81/Service1.svc in a new browser window do you still get the 403?
It seems VS has lost the its project settings. Bring up "Properties" page on the web service in VS. Go to the "Debug" tab. Under Servers/Virtual Path: my configuration was set to just "/". Put the name of your server back in there "/Service1.svc" and it should work from the debugger now. This fixed the problem for me.
The problem went away when I upgraded to VS 2010 Pro. I never fixed it on Express, but after upgrading the problem was gone ... I had the "Start without Debugging" option in the Pro edition, so I suspect that the problem may have been specific to Express.
Related
I have developed ASP.NET project in Visual Studio 2019. When I try to run the project with IIS Express, the webpage says “This site can't be reached” and "The connection was reset".
In taskbar I can see that IIS Express is working and I'm able to debug and step though my code till the very end successfully so I know the service is executing fine without any errors.
Site can`t be reached
I created a new project, just to ensure that there weren't any errors within my config or build files. When I run the new project, I get the same result.
I tried with other browsers as well, but still the same error.
I repaired the Visual Studio using the Visual Studio Installer, and reset everything to default, and had no success with that.
I tried to delete hidden vs. folder and had no success.
Any advice on how to resolve this would be greatly appreciated.
Thanks!
I fixed the issue by deleting Kaspersky Antivirus.
I have a vs solution with 2 projects - WinForms client, and WCF Service.
Since visual studio 2013 to 2019 (I was under Windows 7), every time when I ran in debug the WinForm client, VS automatically was starting the IISExpress in background(I want that!), and my calls from the client were successful, stopping on breakpoints inside the WCF service easy.
Last week, I got new box with Windows 10. Now when I start the client, there is no iisexpress.
The source code is the same and not changed - my co-workers are under Windows 7 and this works for them - same code - we use git as version control.
The only time I see iisexpress is if I do "Update Service Reference" or I make the WCF startup project and run it.
Can you help me identify why this functionality stopped working? Ideas for a fix?
Windows 10, Visual Studio 2019 Enterprise, .NET 4.6
EDIT: I do not have problem running the webservice in IISExpress, when i specifically run it - it works, also on solution level if I set 2 startup projects, all will work. The main issue is that with Single Startup project - thw WinForms client, Visual Studio will not bring up the IISExpress instance. It is only development time issue, and this works for my co-workers.
The solution is in the VS generated (regenerated if missing) user file in the WCF project
.csproj.user
there is property
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
It must be True, but now it is defaulted to False.
The *.user files do not go to version control, and if they are missing VS regenerates them, hence my coworkers had it, and my freshly cloned repo did not.
I'm pretty sure I never touched this file or did any configs like that on the WCF project, my suspicion is that MS decided to start defaulting to False in some version or patch.
WARNING! After changing the option, close/open the entire solution or restart VS.
Disclaimer: I found this solution in the build in VS report problem button leading to a portal with reported problems and solutions. I do not see how to copy link or anything from that Feedback tool, but this is the guy that deserves the credit: 佐々木隆幸
It seems that you want to debug the WinForms application separately regardless of the WCF application. we could set up the project dependencies in the property page of the VS solution.
Then open the SVC file, press F5 to launch the WCF application so that we can add service reference in WinForms application.
Please ensure the below configuration in the property page of the WCF application project.
Besides, if there is something wrong with the IISExpress, we could opt to repair the IISExpress in the below dialog.
On my side, it works like a charm.
Feel free to let me know if the problem still exists.
sorry if this is a stupid question but I don't get it.
So I've created an ASP.NET 5 page using Visual Studio 2015 and DNX.
Out of the box I have these two dependencies in my project.json:
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4"
Under "commands" in project.json I have the following:
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"
In the project properties I can change profiles between "IIS Express" and "web" as deployment options. Both are working fine, when I start debug it starts the web server (either IIS Express or the WebListener) and the site is working. If I stop debugging the server stops. The WebListener opens a "dnx.exe" in a command prompt.
This pluggable server layer is really nice, I get the point. But how do I, as a developer setup an easy server where I can make a change to my site and quickly see the changes?
I can of course install IIS and create a site that is pointing to my wwwroot but is that my only option in the ASP.NET world? Can I have the WebListener "started in the background" (without showing me a command prompt with dnx.exe)? I can also start a node server but yet again - it's great that i can but why do I have to when I have the full ASP.NET toolbelt?
ASP.NET 5 has dynamic compilation but I'm not sure how to even test it since my web server is only started when I'm in debug mode.
I know that this is a pre-release but any help would be greatly appreciated.
But how do I, as a developer setup an easy server where I can make a
change to my site and quickly see the changes.
Regardless of the server used, you can use dynamic compilation by Starting the project without debugging (Shift + F5).
Due to architectural reasons, dynamic compilation does not work when starting with debugging (F5) in Visual Studio. This is due the fact that the difference between Shift + F5 and F5 is that in the latter, VS attaches the debugger to the process.
Will this every be supported in the future? That is unclear but right now because VS isn't "smart" enough to handle detaching from process, waiting for dnx to dynamically recompile, and then reattaching to the process. However until now it never had a reason to support such a scenario, so it is unclear if it is just a "it doesn't know how to do it yet" or a "it is impossible to do."
I can of course install IIS and create a site that is pointing to my
wwwroot but is that my only option in the ASP.NET world?
No. You can use any webserver which supports Microsoft.AspNet.Hosting. Today your choices are limited to IIS, IIS Express, and the two experimental servers you linked to but the goal is to enable third parties to develop alternatives by providing an interface that can be programmed against (Microsoft.AspNet.Hosting).
ASP.NET 5 has dynamic compilation but I'm not sure how to even test it
since my web server is only started when I'm in debug mode.
If the web application is running then the server is started. No webserver = no ASP.NET application. I assume by "debug mode" you mean "Start with Debug (F5)". If so then "Start without Debug (Shift + F5)" to fix the problem you're experiencing.
Here is an excercise:
Close Visual Studio (not a requirement but useful to show none of this is VS specific).
Start the web server. The easiest way would be dnx . web run from command line in the project root folder. You could however start IIS Express (should already be configured) or even configure the IIS and start it.
Verify the web server and web application is running by opening it in a browser.
Using notepad or some other text editor, edit a file in the project that would have a visible change or just force an error "throw new NullReferenceException()".
Save the file.
Refresh the browser.
The web application will reflect the change. You may notice a slight delay if you refresh quickly. That is the dynamic compilation to memory occurring.
In our MVC web application, we have integrated windows workflow. Its working locally without any issue. After deployment of the application in windows server 2008, workflow functionality is not working. I am not getting any error. But the application in browser is keep on running with no result.
Note: .Net4.5 framework is installed in server.
When I googled, I found few solutions and I tried the below
Right click the web site that hosts your service in the IIS Connections pane, click Manage Websites -> Advanced Settings and add ,net.pipe to the end of the “Enabled Protocols” setting (no spaces!)
Still facing the issue. Please guide to fix this issue
When I see the event viewer, I observed an information saying that
"Login failed for user 'IIS APPPOOL\ASP.NET v4.0'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors."
I have added user, "IIS APPPOOL\ASP.NET v4.0" to DB Logins by openning SQL Management Studio, Navigate to database then open the Security then Logings and add new login. It solved the issue.
I've just got to the bottom of this, and couldn't find the problem documented anywhere, so thought I would post the question (and answer) for future reference:
I've just installed CruiseControl.NET on a (virtual) Windows Server 2003 and I can't access the Dashboard. CruiseControl (ccnet.exe) runs fine, and IIS6 is up and running, and the the CruiseControl installation installed the Dashboard app under Default Web Sites as "ccnet". It's pointing to the dashboard folder, and the dashboard files are visible in IIIS Manager, but when I try to access http://localhost/ccnet I get a 404: Page Not Found error. I get this whether I use IE or Chrome, or try to Browse the site from IIS Manager.
What's wrong?
ASP.NET was Prohibited, and needed to be Allowed - in IIS Manager, click on Web Service Extensions under the server, select ASP.NET and click Allow.