Visual Studio options greyed out? - asp.net

I'm working on a ASP.NET Web Application project, and I'm unable to add a web form to application. The "Add Item" menu item isn't there like it was before. I've tried three different projects and it keeps happening each time. You can see what I'm referring to below:

Turns out I was in the middle of a debug (thanks Brad Christie) so if anyone has that problem, that's the likely solution.

Publish option greyed out
For me, the project I was trying to publish needed to be selected in the project explorer before the publish option became available.
Why put this answer here?
Google sent me here even though I was specifically searching for the Publish option. If it sends other developers here, perhaps this answer may be useful.

Related

Can't find the ASP.NET Configuration tab in the Website menu in Visual Studio

I'm going crazy because I can't find the ASP.NET configuration tab in Visual Studio 2017.
I'm following Microsofts ASP.NET tutorial on how to create a login page with members.
This is what the tutorial tells me.
And this is what my menu looks like.
Please help me. I've been looking after it for an hour now without any luck.
Link to the relevant chapter.
This menu item was removed some time ago (VS2013 or VS2015, I can't remember). It's unfortunate that the documentation hasn't been updated.
Anyway, you should check out ASP.NET Identity instead. It's now preferred over the old Membership provider model you're looking at. Give it a go at asp.net/identity
I assume you were on this page, yes? If you click the other versions link, you can see its meant for Visual Studio 2010. Nice of them to make that obvious, eh? Anywho, if you want built in authentication you can still use it, you just have to pick the Individual Accounts option for authentication when creating an account. This is not using the old school Membership Provider though, as that is outdated. Detailed instructions can be found here.
If you still really really want the old MembershipProvider, I would suggest just downloading Visual Studio 2010 from here and going to town. Enjoy!

Cannot associate app with store

I am using visual studio 2015 and tried to associate my app with the store but the menu in project/store in vs is always disabled. Any ideas?
I could not find much information while googling and in the tutorials it says that one should choose this option.
Pulling an answer from the comments: The Associate App with Store option only works with Windows projects. So it will appear disabled for other platforms.

Asp.net mvc view engine - to roll my own intellisense

I'm creating a little special purpose view engine for asp.net mvc. That goes well enough. But i've been looking around to find information on how to somehow add intellisense for the C# code embedded in my view.
I can see Spark does that, but going through the sources, I still can't see how. And WebForms view engine does it - not surprisingly - to perfection. Does anyone have any suggestions or links or anything related on how to do that?
Update: Just to let readers know, I'm still looking for a solution! So keep the answers coming :) ... I will post back here too, whenever I find out more.
/Asger
Looking at the Spark source, it appears that he is hosting his editor within the Visual Studio 2008 IDE, in a way that he is getting the C# intellisense for free.
You might want to check out the Visual Studio 2008 SDK 1.1, and see if there's something in there that will help you.
http://www.microsoft.com/downloads/details.aspx?familyid=59EC6EC3-4273-48A3-BA25-DC925A45584D&displaylang=en
You might find some clues here:
How do I add intellisense to my application?
Googling this is maddeningly difficult, as you get all kinds of hits on enabling intellisense, how wonderful intellisense is, how bad intellisense is, etc.

Error: "Failed to map the path '/'" when I add a Telerik ReportViewer to web page

I've just built a crap load of Telerik reports for my web site project, and they all work nicely. I have to demonstrate them tomorrow, and tried to build a viewing page that hosts their web ReportViewer. I have asked this question on their forums as well, but expect less response than from SO late on a Friday night.
Whether I use GAC or bin references, as soon as I add the ReportViewer control to my page, even without trying to load a report, I get the error Failed to map the path '/'. Other Telerik controls, from the Web.UI library work fine. I'm not expecting a Telerik specific answer here, although that would ease the pain of my all-nighter, but I can see nothing meaningful in the stack trace for this error.
How can I go about diagnosing what Telerik is looking for and can't find, or something of that ilk? This is a serious emergency, and I will sort a 'dereferenced' bounty for anyone that can offer any suggestions tonight. I'm going to reinstall Reporting so long.
UPDATE: Foolishly wary of excess complicating factors, I always try new things like this in a small, dedicated project separate from my main one. Yesterday I quickly tried a small web site project when I encountered my problem. I then tried a small web application project, with local, not GAC references to telerik, all telerik refs set to copy to local, and it all worked. Naturally I was quite ecstatic, as my main project is a web app, not site.
so you have a webpage running without problems.
Than you add a telerik ReportViewer controls - run the things again and get an error:
...Failed...'/'...
The control simply sits in the page and does nothing.
So like womp I would ask you to provide the full error output!
One other question:
Does the error also occure on the development machine (running the project from VS with webdev server)?
And a hint meanwhile (not sure if you'v already checked this):
http://www.telerik.com/support/kb/reporting/general/deploying-telerik-reporting.aspx
One last thing - maybe it con help you. I made up a little web site doing what you have told your site does.
You can download it here: www.pp-p.com/rvsite.zip
Maybe a look at web.config or so can help you to find what's missing in your site.
One thing - in the BIN folder are two txt files - replace them with the DLLs from telerik reporting to have the project work.
Maybe this helps (for the weekend till the telerik support guys are back at work)..

Multiple 'development servers' started by Visual Studio

Occasionally, when performing certain actions in Visual Studio, things seem to go 'haywire' - Visual Studio launches many, many instances of the 'Development Server' - multiple icons appear in the notification area, multiple successive 'toast' notifications pop up etc etc.
Both of the solutions I have this problem with contain two web projects, one of which is set up to use ASP.NET forms authentication.
I am also using the Perforce source control plug-in. These solutions are under source control.
Actions that can prompt this behaviour are things like, creating a content page from a master page, clicking on the 'Configuration' icon at the top of the solution explorer. Ironically, actually running one of the projects doesn't seem to cause the same problems.
Once things have settled down, I end up with a notification area that fills half my taskbar. 'Running' the mouse along these icons then causes them to disappear, in the same way that you sometimes get with applications that have terminated unexpectedly.
This is becoming pretty frustrating as it tends to block things I actually want to do!
Grateful for any advice. Hopefully I've been sufficiently clear - it's not a straightforward issue to describe!
Thanks,
Jamie
Please check out the blog post at http://vishaljoshi.blogspot.com/2009/08/multiple-instances-of-visual-studio.html
Did you check the "Properties" page (right-click of your solution file) of your solution? You should be able to set the starting project there to "Single Startup Project".
Sounds like the Web Configuration service is failing during startup and VS is trying to restart it.
I would either stop using that tool--it always seemed overkill to me once you learn how to manipulate web.config and get your basic user/role admin CRUD pages on the site. But it may just be some bad data in your authentication database, if you're using the built-in Membership providers, etc. If it's development, try using the aspnet_sqlreg.exe (or whatever it's called) to remove and re-create the Membership, Profile, etc. database tables and stored procs.
But first, I would check the Application event logs and see if the exceptions there help you track down the issue.

Resources