I Changed the TFS server computer name:
after i changed it i connected to the TFS server from Visual Studio using the new name after changing the connection string for the database (i am using the same server For TFS and TFS database). the connection succeeded, and i retrieved the projects from the Project collection, but when i expand a project i get a RED X on "DOCUMENTS" and "REPORTS" folder.
What do i need to do exactly to make it work. I know i should run a command to change the computer name in the workspaces, but i am not quite sure what is it and how to execute it.
What a bad idea!
Any moderate to complex system has many configuration items, not just one connection string.
To give an idea TFS is composed by: some Web site/services, a Window Service, a SQL instance (DB and Analysis), one or more SQL Server Reporting services, not counting other Windows Services for Build and Test that can be added to the architecture. And both TFS and Sharepoint have a Configuration database.
In this page you can get some hints of the steps you should have followed.
Specifically, the "Documents" folder error is about accessing Sharepoint and the "Reports" folder error is a failure of Reporting Services.
Frankly, if it was a simple computer rename, the best course of action is to restore the previous name, and use DNS alias for the new name. This is described in this post.
Another cheap way to fix things is to rebuild a new machine and move the databases from the old server, following this instructions.
Related
I am currently trying to set-up a Sitecore project on my PC. When I go to view the project on my browser I get the following error:
Sitecore Cannot open database "marktwoSitecore_Web" requested by the login. The login failed. Login failed for user 'blah''.
These are the steps that I have carried out so far:
1) Firstly there are three types of sitecore installations to do:
- Complete
- Database only
- Client only
I have gone with the Client only installation.
2) The Sitecore "Client-only" installation instance was made inside the inetpub/ wwwroot folder.
3) I then made a visual studio project
4) I made a folder called "Libraries", which is located in the root of my visual studio project solution. I copied over all the relevant Sitecore.dll's from the wwwroot project to my visual-studio project into the Libraries folder. I also replaced the Default web.config file in my Visual studio project with Sitecore's version of Web.config. And then I added Sitecore references to my Visual Studio project.
6) With all of the initial configuration done; I set-up a publish profile so that I could publish my C# code to inetpub/wwwroot project. I did step four so that my publish would not overwrite sitecore dlls.
5) I changed the Connection strings in App_Config/ConnectionStrings.config to point to the Web, core and master sitecore databases. That were created during the Sitecore installation.
Those were the steps I did prior to getting the error about invalid login credentials. I am not sure why I am getting this error; since I went into Microsoft SQL server Management Studio and I gave the user "blah" admin rights to all of the datbases: Master, web and core.
Any support and guidance would be greatly appreciated; as I am unsure of how to address this problem
This error is happening because the web database referenced in your Website/App_Config/ConnectionStrings.config is either not there or the permissions are not set properly on that database. The easiest way to troubleshoot is to load SQL Server Management Studio specifying the host, username and password that are in your connection strings and see if it connects. It sounds like you are probably logging in with your Windows user when you are making the changes listed above.
You could try making the blah user a "db_owner" to see if that helps or your local instance may not be in "mixed authentication mode" which allows for named users and windows users. You can change that in the settings, but you need to restart the service for it to take effect.
I have an error where everytime I open Visual Studio, I get the following error:
TF205020: Could not connect to server ‘tfs.server.com\collectionname’. This server was used in your last session, but it might be offline or unreachable. Confirm that the server is available on the network. To attempt to connect again, or to a different server, click ‘Connect To Team Foundation Server’ in Team Explorer or the Team menu.
The server returned the following error: TF400324: Team Foundation services are not available from server tfs.server.com\collectionname.
Technical information (for administrator):
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.We were unable to automatically populate your Visual Studio Online accounts.
This is an on-premise TFS 2013 Update 4.
I always get this error when starting Visual Studio and I have to go into Team Explorer and explicitly connect to the server to get it to connect correctly.
The issue is that the URL in the error above is wrong. It is missing a virtual directory.
Correct URL: https://tfs.server.com/tfs/collectionname
Url in Error: https://tfs.server.com/collectionname
As you can see the tfs directory is missing. I can see that the server is setup correctly in Team Explorer and I can also see that it is setup incorrectly in the Workspace configuration. Here is a picture of the workspace config.
My question is:
Where does this URL come from and why is it different to that stored in Team Explorer?
The URL is stored in your sln file. You can either do File -> Source Control -> Advanced -> Change Source Control
Or you could crack open the sln file in notepad and change it there.
I would recommend brute force approach first. Delete that workspace and create new one from scratch.
I am using TFS 2012. I wanted to test how i can recover from server failure or any hardware failure, So i wanted to shift TFS to new PC.
I followed some articles to restore it. what i did is
1)I had full backup of TFS_configuration and all other collection database.(backup taken using TFSbackup.exe)
2)In new PC i installed all the softwares(such as TFS 2012, sql server etc).
3)created all the windows user account as in old server.
4)When I checked the New PC it had default collection created which was mapped to sql server which i installed.
5)Now i deleted that default collection and restored all databases of my old TFS server(TFS_configuration and all other collection database.)(backup restored using TFSrestore.exe)
6)Now when i checked TFS administrative console it had all the collections as my old server.
7) But when i click on Administrative security, group membership etc I get error like
TF30046: The instance information does not match. Team Foundation expected 368f7830-1c67-4c4c-8bc4-ba3d5b5a5543 which was not found. Please contact your Team Foundation Server administrator.
In this link it was mentioned to change service host id in table. But it didn't work for me.
So please help
You mistakenly configured TFS (in fact it created a default collection). If read carefully Move Team Foundation Server from one hardware configuration to another, you have to run the AT-only Configuration Wizard after restoring the databases.
I have a problem which I thought could be common, searched the web for it but found nothing.
We're using a shared development machine, and every developer connects through RDP and has his own profile, desktop, etc.
The problem I am encountering is with IIS express. Since it is configured at user level (applicationhost.config inside documents/iisexpress/config) and the port configured must match the one declared in the .csproj file, two developers can't possibily run on the same port, as it gives the error "the port is already in use".
So to make it work we have to manually change the port both on the csproj and in the applicationhost.config for every developer, but it's only a temporary fix as when we commit our changes to SVN, the csproj file gets merged, so we have to do this process every time someone commits/updates.
My question is: is there a clean way to use IIS express with Visual Studio 2010 on a shared development machine?
Thanks.
Partially tested answer. Not sure how it'll work on a multi-user workstation. It might give you, or someone else here, a jumpstart to a proper solution that works best in your existing environment.
It appears that Visual Studio stores all the web configuration in the csproj/vbproj and IISExpress stores its configuration in %userprofile%\Documents\IISExpress\config\ApplicationHost.Config.
Normally, we store the csproj files in source control, but ignore the csproj.user file so that each person may have some unique settings, such as the web configuration.
Each user who signs into the box must have their own profile.
Each profile must have their own copy of the source code.
Each user's copy of the source will contain their own csproj.user file.
Ignore .**proj.user* files in your source control.
Copy the web settings into the csproj.user by unchecking the option Apply server settings to all users and then commit to source control.
Each user who pulls a copy of the source will have to configure their web settings, use a unique port that the others users are not using, and uncheck the box above so that their configuration is not passed on to the other users.
Doing this, Each profile will have their own IIS Express ApplicationHost.Config configured with a port that is different from the other profiles. Each user's copy of the source will have a csproj.user that is configured with the same port in their profile's IIS Express configuration.
For reference:
I've tried changing IIS Express's ApplicationHost.Config to use a different port than what Visual Studio expects and Visual Studio is unable to connect the debugger to IIS Express.
How IIS Express's configuration works: http://msdn.microsoft.com/en-us/library/ms178109.aspx
The best option you can use is to take advantage of the Import functionality built into MSBuild.
Essentially, you would create a seperate build target for each user. You can then import this target from this referenced file directly. I would then recommend creating this file on the server (for each user), but leaving it outside of source control.
This should allow each user to have a custom IIS port without conflicting with others.
I think you can create subdomains for each user and implement the required changes and do the testing. In this way each user can his own subdomain and port and hence work independently on the shared IIS Express.
You probably won't like my answer but here's my thoughts:
As you noticed, the configurations are tied to the user profile and not the server; this is because IIS Express is not intended to be used as a shared development server. You should be using full IIS.
I do not see any benefit or reason to use the same physical box for development. Admittedly, I don't know all the details of your scenario with licensing or workstation resources, but it doesn't seem like you gain much from having everyone RDP into the box to use Visual Studio - each person still needs a license, performance will be slower, and you shouldn't be working on the same project instance.
You should seriously consider your entire setup for development:
Each developer should use Visual Studio on their workstation, and debug/test there using IIS Express (configured with the same ports and settings across all machines - very easy).
From there, your developers should check their code into source control, and examine conflicts that may or may not arise. I'm not sure about SVN but the MSBuild automation available in TFS can be use to setup a continuous build policy that deploys to a common IIS installation so that your merged code is tested and usable from the full IIS installation mentioned above.
Anything else would be a workaround/hack that will bite you in the butt later.
Source control is acting wierd.
Here is the scenario:
I had to reformat my computer. I backed everything up first, then blew it away. All of my backup is located on a virtual harddrive on the network, which I can connect to in order to grab what I need temporarily.
I have re-added my website / project to the same file location but now source control doesn't seem to be working.
I have made some edits which I believe the second developer does not have.
Also, the second developer has made some new edits to the website and because I am not properly hooked in to source control I cannot get those changes.
Does anyone have any ideas on what the problem could be?
Your local machine keeps a cache of the server and local workspace configuration - you will need to rebuild this cache. In addition, your Team Foundation Server workspace is tied to your original computer (workspaces are uniquely identified by your local hostname, the workstation name, and your username.) If your hostname has changed on your new computer, the server will not be able to find your existing workspace and thus it will not be able to participate in source control.
If your hostname is the same and you have copied all of your source tree over to the identical location, you should be able to simply rebuild your workspace cache on your new machine. As soon as you connect to the server (using Team Explorer in Visual Studio, or with the tf command line client) your workspace cache will get rebuild and you should have a copy of the pending changes you had on your old computer.
If, however, your workstation's hostname has changed, you can update the the hostname associated with your old workspaces. You can do this by running the command:
tf workspaces /updateComputerName:oldComputerName /collection:http://tfsserver:8080/tfs/MyCollection
Finally, you have one other option: you can simply create a new workspace and copy your changes in. You would do this by creating a new TFS workspace, getting the latest version of the code to a different directory, copying your changes over, and then detecting those changes and pending them to the server by using tfpt online from the Team Foundation Server Power Tools.