I don't really know how to title this question.
I have an MVC project web site.
I wanted the login system to have roles, so I implemented that. I noticed that when I published my website, the localdb Entity framework DB with the login users weren't working.
So I edited the DefaultAppPool settings to allow the localdb to be used when I publish web.
I thought everything was working, I could log in. Great!
Though, I noticed I could not log into my admin account. Only when I used IIS express, the test debug (View in Firefox) option I could.
I registered a new account in the "View in Firefox", checked my SQL Server Object explorer for the tables, view data, and saw the new account there.
I publish web, create an account; it does not appear there, and I cannot log into that account.
I have two users I can log onto (created when I first started the MVC5 project), but their information is found nowhere in the SQL Server Object Explorer. I have no idea what table or database my website is using when I publish, but it is not the localdb which is created with new MVC projects like I wish it was.
How do I fix this problem. I have no idea what to google.
TL;DR
I want to use my localdb when I publish my site to IIS when I click the 'Web Publish' button in Visual Studio 2015. Instead it's using an invisible database I cannot find.
Related
I have different accounts with different VSO subscriptions. I'm trying to connect to a different account (from the one I'm logged in VS-2015) so that I can check in code in the repository that I have in that account. But when trying this, Visual Studio brings me to the profile website, from which is basically a dead end - what am I supposed to do from there?
The "Connect to Team Foundation Server screen sometimes just freezes after authentication, and doesn't go anywhere from there.
So clearing the settings file, which is named CurrentSettings usually in the folder C:\Users\your user name \Documents\Visual Studio 2015\Settings (Windows) - helped get passed this issue.
Also, when you are brought to the VSO Profile page (the one I showed in my picture question) you have to select the project you are trying to open.
Earlier this year I successfully deployed a MVC app to Azure from Visual Studio.
Now I'm trying to do the same thing again, but now I am told my azure account "has no subscription".
However I am 100% positive I do have a subscription associated with my email. My old MVC app still runs and I can see my Pay-as-you-go is properly charged.
What I Have tried to fix it
Emptied my browser caches, history, cookies etc.
Removed my account from Visual Studio, restarted, and added them again.
Formatted my computer and reinstalled everything (not really because of this problem, but the timing was perfect).
Updated the Azure SDK to the newest 2.9.5.
I did the following things above based on advice from these pages:
Visual Studio not finding my Azure subscriptions
Unable to publish to Azure with VS2015
No subscription found in windows azure account
But alas, no luck.
The only thing that comes to thought is I tried to add an Azure Pass to my account, but without luck. But I can't see how that should change anything...
So my question is: How do I make Visual Studio recognize my current Pay-as-you-go subscription, so I can publish my services, apps, etc. from Visual Studio directly?
Or at least: What has gone wrong? Whom can I contact to get help with this?
As always, thank you for your time and patience, and please write a comment if you need further information.
You may try to connect first via the server explorer (ctrl+alt+s). (The server explorer has an azure root node, if the azure sdk installed)
If you have connected, the publish wizard won't ask (usually) for sign in again.
In my case, the solution was as follows:
Open Server Explorer in Visual Studio, right-click on Azure and select "Manage and filter subscriptions":
Screenshot of Manage Subscriptions Dialog
Click the Certificates tab, click Import, then click Download subscription file. This will take you to the azure portal page where you can download a .publishsettings file for your subscription. After downloading that file, click the Browse button in the Import dialog shown above and select that file.
I had the same issue. To solve it I opened the server explorer (ctrl+alt+s) and refreshed the Azure connection. It still said 0 subscriptions, but in the publishing options I could connect without any issue.
I am new to publishing to Azure websites straight from Visual Studio. I am running VS 2015, have setup my Azure website with 1 channel so far and have successfully published to the website. I then, went about my week (several reboots) and finally came back to the project, made some changes then tried to publish with the saved publish settings. The password was missing! And, as you know, it is not really a password but rather the hash of the password.
How do you save this information so you are not forced to build a new publish every time you restart Visual Studio? I now have a half dozen publish profiles, all for the one site!
In your publish profile, next to Resource Group, click "Manage in
Cloud Explorer".
In Cloud Explorer, navigate to your App Service.
In the bottom window, click "Download Publish Profile".
In this file you can find your password.
Make sure you are signed in with your azure account by entering your credentials every so often.
If you are signed in, try not changing or clicking on the password field. Just click on publish without touching the previous info.
I always either import the XML from Azure Web portal, or I select the website by signing into Azure in Visual Studio.
Please let me know if this helped.
I'm using Visual Studio Team Services (was TFS Online) server {MyProject}.visualstudio.com. I'm able to connect to the server, map the project, even receive a review request, but I can't see my team projects under DefaultCollection.
Currently when I'm opening the Source Control Explorer I'm only seeing
{MyProject}.visualstudio.com\DefaultCollection
underlying projects are missing, but my user is in project team members list.
What I missed, what I should do else to be able to browse my projects, get and work with them?
Note: My account was not a microsoft account. I received an email to join the visual studio after tfs administrator added my email as the project team member. I follow to the link and I create a new account during VS sign up using that email and then successfully signed in.
Thanks a lot
This is usually caused by the "Access Level" that the Admin assigned to your account.
When your account is assigned as "Stakeholder", you can only access to "Work" section, cannot access to "Code". If you want the access to "Code", you need to ask your Admin to change the access level of your account.
Have the TFS Admin review your user's rights to the code in the team project. Generally we add users to the Contributor role for the project.
You should also try hitting the Refresh button (third from the right) on the Source Control Explorer window.
I had similar problem and as usual Microsoft has not useful error. Here is step by step tutorial to fix it.
The problem
Solution
This is related to user permissions. Note two things
If you are using 5 user free version, make sure to select user as "Basic user". Free version allows only basic membership.
Then go to Security setting, expand to see "Team Foundation Administrators" and add the new user this. This should resolve the browe project issue.
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.