I am trying to create a basic asp.net web application in visual studio 2013. Once I click create project I get the dialog box with messages showing the packages/nugets is loading. I then got a message that it's unable to load the Application Insights. I'm not sure what Application Insights is but I've never received that message before. Also there is a weird folder called ".nuget" that appears in my solution which i never had in previous web application solutions.
I know this could be something related to azure but i'm not sure how to remove it from my solution safely and what i should do in order not have them be loaded in newly created solutions.
Application Insights is a monitoring service that helps get telemetry about your application. To disable the option to add Application Insights to your project, uncheck the Application Insights box in the "File->New" dialog.
Related
One of the web application projects in my visual studio solution has a blue exclamation mark icon on it and the tool tip shows The Web project <Project.Name.Here> has IIS configuration warnings
I can't see anything in the project Properties pages, or in the web.config file. It started yesterday, and I assumed restrating VS and reloading the project may get rid of the warning, but it has not.
What is this and how do I go about resolving this issue?
Google has not been helpful this morning!
Try right clicking the solution in the Solution Explorer, the option Resolve Errors should be available.
Selecting this should show you the message behind the icon you're seeing on the project. For me, this was:
ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly.
If this is the message you're receiving, this MS blog post may help you fix it.
Update
Note that once you've selected this option, the IDE assumes you've resolved the errors and removes the icon and menu option (!). So make sure you read it or restart VS to see it again.
I have a WCF service hosted in IIS which is consumed by a Silverlight client application. When I run the Silverlight application, none of the break points seem to get hit (not breakpoints in the service, although they also don't get hit. That service is not in the same solution).
Normally when I've created SL projects in the past, they hit break points by default, and I can't thing I've changed any of the settings.
When I run the project, I do get a message box saying, "The Silverlight project you are about to debug uses web services. Calls to the web service will fail unless the Silverlight project is hosted in and launched from the same web project as the web services. Do you want to debug anyway?"
So I say 'yes'.
My break point is in a place that I know gets hit (InitializeComponent in MainPage.xaml.cs), so that's not it.
I don't know if it makes a difference to the client application, but the WCF service does have within its App.config the compilation debug set to 'true'.
Can anyone help?
Edit:
Some useful points: The project is set to debug. There is no web component to the SL project. The application compiles and runs normally. The code in the screen shot below is the code behind for the main page which is the default page (and the one I see when I start the project). The Visual Studio version is 2010 Ultimate (version 10.0.40219.1 SPRel) and I am not creating an OOB application. As well as just running regularly, I have specifically started from the Debug->Start Debugging option in Visual Studio.
Screen shot:
If that image isn't clear enough, there is the full resolution one here.
Second screen shot showing a break point on the InitializeComponent in MainPage.xaml.cs which doesn't fire (the previous one showed the constructor of the related view model).
Again, if that's not clear enough, the full resolution version is here.
The message your getting is unrelated to your breakpoints not being hit. This 'warning' isn't entirely true as well, as long a the webservice you're calling is running you'll be fine. You can happily ignore this warning.
As to not hitting breakpoints, I can think of two reasons. You could be building in release mode, or you could be starting the wrong project. You should not be starting the MyApp.Web project Visual Studio probably created for you, but the actual Silverlight project.
If it isn't one of those options you should provide a bit more detail about what you're doing, like Visual Studio versions, whether you're running an out-of-browser app, does the app actually work etc. There can be a few more things to check but it hard to guess it them with this little info.
I'm not seeing a test page.htm in your solution. How are you hosting / running the SL app?
If you were hosting it in an ASP.NET web app I'd say check that the Silverlight debugger was enabled on the web project project properties.
But as it is I can't see how the silverlight app is getting run at all...?
I have a Silverlight app that I want to access Azure storage. I have two projects in my solution: a SL project and a ASP web role.
The web role has a service. When I launch the project, I go to the service, and it works fine. (I am able to download the data.)
I'm not entirely sure what I can do through "Add Service Reference", but I suspect that might be what I'm supposed to do here to make use of the full power of WCF. I open the dialog box, and hit "Discover" to find services in my solution. Visual Studio finds my service, but when I click "Go" it fails with a 404 error. This is not terribly surprising, given that my ASP localhost server is not up at the moment.
It seems like I should be able to add the service reference when the devserver is running, but Visual Studio has the menu item to do so grayed out.
What am I supposed to do here? Am I completely confused about what service references are for? Should I just use WebClient, hardcode the URI, and de-serialize the XML into objects myself?
James's answer will work. However, an easier option if you have both service and consumer projects in the same solution is to use the "Discover" button to the right of the "Go" button in the "Add Service Reference" dialog. If you click on the little arrow you will see it says "Services in Solution". This will then make VS search the solution for any valid services you have implemented and thus you don't need to have the service running at the time.
Another option is to run the service locally under IIS.
I think using WebClient is probably overkill. I wouldn't re-implement simply to get around a Visual Studio usability issue (even if it is tempting).
Try opening the projects separately. By this I mean opening two Visual Studios, one with the web service and one with the Silverlight application. Run the web service (so you cansee it working in a browser) and then create a service reference directly to the URL of the service running in debug mode in the other Visual Studio.
Once the service reference is created and all of the proxies are built you won't need to do this again unless you change the interface of the service.
I've created a Silverlight app and VS set up a web app for testing automatically. Worked great - whenever I hit "run" it pointed a browser to the web app page which hosted the Silverlight app.
I've done some renaming of the projects, namespaces, files, etc. - just some general clean up. Now when I press "run" on my Silverlight app, it starts up a browser that points to the Silverlight app on disk, rather than pointing it to the test web project that VS set up automatically for me. I've dinked around inside the project settings and can't figure out how to fix this. How do I get it so that when I click "run" on my Silverlight app, the browser is pointed to the web application which references the Silverlight app?
Sounds like this is caused by the StartUp Project for your solution being set to the Silverlight application itself, rather than the Web project.
To fix this, right-click on the Web app in Solution Explorer and click on "Set as StartUp Project".
Also, right-click on your *.aspx or *.html file within your Web project and click "Set As Start Page".
Hope this helps!
Just in case this helps anyone:
I encountered the same problem, and the above method unfortunately didn't work for me.
Here's what I did: I unchecked 'Generate app manifest' from the project settings, and ticking it and rebuilding solved my problem.
I've got a solution with many projects
One of these proejcts is a "MyProject.Web" web application.
This has a web reference to MyProject.WebService" project -
I have a breakpoint in the WebService project, and i call the method on one of my Web forms, the break point is not hit....
How can i enable this?
Right-click on the solution and choose "Set Startup Projects". Choose to start multiple projects and select both your web site and web service to start with debugging. Then when you start the debugger they will both fire up and you should have full debugging in both.
I ran into this too a while back and this is what I followed:
http://dansen.wordpress.com/2008/04/15/debugging-wcf-clients-and-services/
Visual Studio has feature that
supports attaching to multiple
projects when starting up.
In this example, I have a WCF service
hosted in IIS which lives in the
Wcf.Demo.IisServiceHost project. I
also have a Wcf.Demo.TestHarness
project which calls the service. I
want to be able to attach the debugger
to both the client and service by
simply pressing F5.