Using SVNBridge with TFS (not CodePlex) - tfs

I'm trying to access my TFS Server using SVNBridge so I can work disconnected. I tried using the server-based as well as client-based solution. I'm just getting internal server 500 errors returned. I'm not sure I'm connecting to the site correctly though.
Other posts I've read concerning SVNBridge seem to exclusively be about CodePlex and connecting to it through a CodePlex specific URL.
I'm trying to connect to my own TFS server and wondering how to properly format the URL. Do I need to do something special for that? I feel like I've tried everything. Anybody have any success doing such a thing?
So apprently the problem is related to TFS 2010 Beta 2. The issue is being tracked here:
http://svnbridge.codeplex.com/Thread/View.aspx?ThreadId=77164
Thanks.

Not sure if you are still looking for an answer but I just spent the better part of my weekend getting it to work, mostly through trial and error so here is what I learned.
You CANNOT download the zip files and get anything to work if you are using TFS-2010. Instead you MUST download the source code and compile the thing for yourself.
You have to do the build on a computer with IIS installed to use the website project as is. This is what I did rather than change the project to use the development web server.
If you don't have VS-2008 installed anymore you can just upgrade the whole solution to VS-2010 and everything will be fine. I even changed the target of the website project to the 4.0 Framework with minimal issues. I had to unload the TestsRequiredTfsClient project and the Tools.HttpSend project to get the rest of the projects to build.
After you have built the project you need to follow a couple of steps that are outlined on the SvnBidge home page in order to get the bits into the right location on the web server. Once that is complete then you need to tune up the web.config file.
Here are the appSettings that you need to change and the values you need to use:
<add key="LogPath" value="--directoryYouWantToKeepLogsIn--" />
<add key="DomainIncludesProjectName" value="False" />
<add key="TfsUrl" value="http://--tfsServerName--:8080/tfs/--projectCollection--" />
<add key="ReadAllUserDomain" value="--yourDomain--" />
<add key="ReadAllUserName" value="--domainUserName--" />
<add key="ReadAllUserPassword" value="--domainUserNamePassword--" />
If you decided to upgrade the website to the 4.0 Framework don't forget that you need to update the application pool to because it was probably created as 2.0.
After you are almost done now that the website is set up. You still need to install some performance counters from the SvnBridge.PerfCounter.Installer project. After complication just copy those bits over to the same server you just installed the website on and run the exe.
THIS DIDN'T WORK
Okay so last but not least is security. I don't use the Digest security because all of my users have a windows login so I left anonymous access enabled and then disabled all other forms of access except Windows Authentication.
Windows Authentication didn't work for all of the users, some of them were remote. After looking at the source code it became clear that Basic Authentication was the only choice that was going to work. I needed the users to log in as them selves and then have that username passed into TFS so that as the check-ins are done they can be recorded to the correct user.
RP

Related

error ASPCONFIG: Unable to open configSource file

Our .Net Framework 4.8 web application suddenly began to generate the following build-time error on our team city build server:
error ASPCONFIG: Unable to open configSource file ‘sessionState.config’.
Our web.config references an external session state file:
<sessionState configSource="sessionState.config" />
The project is under active development, however no related changes have been recently made to the application. We initially thought it was a configuration issue on the build server, however we realised that we could replicate the same issue on our development machines if we "Published" the project and ticked the option to "merge all outputs into a single assembly". We published to a local file to replicate what was happening on our build server.
Modifying the Build Action of the sessionState.config file from None to Content removed the problem, but this had the effect of copying our sessionState.config file to the deployment package, which we didn't want.
We spent many hours trying to investigate this problem and finally decided to try uninstalling recent Microsoft Updates. This resolved it! I'm posting this here in the hope that it will save at least one other person the time we spent.
This specific October 13, 2020 update was the cause, however, it didn't come up for us when we searched https://support.microsoft.com/en-us/help/4578974/kb4578974-cumulative-update-for-net-framework
After you apply this October 13,
2020 Security and Quality Rollup for .NET Framework 4.8, some ASP.Net
applications fail during precompilation. The error message that you
receive will likely contain the words “Error ASPCONFIG.”
An invalid configuration state in either the "sessionState,"
"anonymouseIdentification," or "authentication/forms" sections of
"System.web" configuration. This might occur during build-and-publish
routines if configuration transformations leave the Web.config file in
an intermediate state for precompilation.
Note their spelling error in anonymousIdentification
The solution is to add this appSettings key to your web.config
<configuration>
<appSettings>
<add key="aspnet:DisableAppPathModifier" value="true" />
</appSettings>
</configuration>
The article notes that setting the value to either "true" or "false" will avoid the issue. It was recommended to set this value to "true" for sites that use cookies for the session state id.
We use cookies, so added this to our web.config with a true value, and it resolved the problem.

Deploying ASP MVC 5 App with IIS 7.5

I try to deploy ASP MVC 5 app in virtual directory (without creating new iis application)
I use IIS 7.5
I already put
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true" />
in web.config file.
But when i go to app url with IE browser it shows me just directory listing like in screenshot below
Is there a way to deploy MVC 5 in virtual directory and make it work like usual MVC application?
You need to convert the virtual directory to application. Right click on it in the IIS management console and choose Convert To Application.... Also make sure that the associated application is configured to use Integrated Pipeline Mode.
I solved this problem earlier in my production environment by checking the directory pointer in IIS. Apparently when I unzipped the deployed site from one server to the next, the zip utility made an extra level, so IIS was pointing to /MyProject when the files were in /MyProject/MyProject. I had a little better clue though, you have Document Browsing enabled based on that screen shot, make sure not to do that in production. I set the site to log custom errors and got a 403.14 response, from there found a blog on my mistake. You need to setup the environment to find the specific module that's failing, I think something to do with trace routes, idk. I'm a software developer that always gets forced into doing devOps; was googling my own problem and thought I'd throw you a line. Without a specific error message, all I can tell you is IIS is not connecting to .NET; something is not configured correctly. Turn off directory browsing, google how to get good error logs back, and let us know the status code so we can help you: 403.14, 401, 500, 404? Also give us the module that's failing. If it's the last one on the handler list, guess what, IIS isn't connecting to the app, which I suspect is your case.

two endpoints want to share the same ListenUri but I only have one

There are a lot of questions on this already but in other cases it seems people are trying to have multiple end points. In my case I only have one and only want one endpoint. My error occurs only if I enable Certificate transport security and only on my development machine.
I have a WCF service implemented via the ServiceRoute in MVC:
RouteTable.Routes.Add(new ServiceRoute("MyServices", new WebServiceHostFactory(), typeof(MyServices)));
The entire serviceModel consists of only this:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true">
<!--<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>-->
</standardEndpoint>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
When the transport security is commented out it works fine. Uncommenting the transport security results in:
A binding instance has already been associated to listen URI 'https://my.dev.machine.local/MyServices'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.
I can take the code and put it in a different environment and it works as expected. WTF?!?
This was a bug in Visual Studio 2012 RC. Even though I was using VS 2010 having the VS 2012 RC installed caused this problem. Once I uninstalled it this problem was fixed. Just make sure you follow the specific uninstall instructions for 2012 because if you uninstall it using the "Uninstall a program" option in the Control Panel it will break VS 2010 ... I learned the hard way.

Azure ASP.NET MVC 3 app won't show css/js after windows reinstall

I have had to reinstall windows over the weekend (win 7 ultimate 64 bit), and have reinstalled Visual Studio, specifically VS 2010 Ultimate, along with the Azure SDK, EntityFramework, and some other assorted frameworks.
I ran into some issues trying to test my Azure app after doing so, whereby the role wouldn't start until I manually enabled IIS, and ran aspnet_regiis. At this point the app will run, and pull up the login page like it's supposed to, but now neither the css nor javascript files will pull up. For some reason just the basic html loads up, and I can log into my app and proceed to the next page, but that's about it; as my app relies heavily on ajax I can't go much further.
If I try to pull up the Content/Site.css file directly (in my browser), I just get a blank file, same with the js file we use. (The server is responding with 200 OK, but then just a blank file)
I'm not really sure what to do, but I will point out that this project/solution did build and work fine before the reinstall, so it shouldn't be anything code-wise that's at fault; something in the environment. I do notice that if I pull up my the Content folder in explorer through my deployment in IIS manager, that the Site.css file is there.. so I'm not sure why it wouldn't be served?
I was tempted to try to reinstall the Azure SDK, but I installed it with the Web Platform Installer v4.0 and I don't see any way to uninstall using this tool.
Any suggestions?
Thanks in advance!
As it turns out the issue was again in the Windows Features, although I had enabled IIS / Asp.Net (which enabled a bunch of other features automatically), apparently I still had to manually enable the option 'IIS/World Wide Web Services/Common HTTP Features/Static Content'.
This allows these static files to be served by IIS.
Thanks for the help guys!
If you deny authorization in the main web.config the css will not show up
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>

ASP.NET Azure project does not appear to load newest content items

I have an ASP.NET MVC project and I am testing deployment to Windows Azure via the local emulator. I can run the project file fine in the development server but when I build the Azure project and it launches via the emulator I am having an issue with content files not being returned correctly. My internal CSS and JS files are being re-directed to the login page as if the authorization is failing; however I do not see where this auth requirement would be coming from.
Things I have already tried:
I have manually removed all the build files from both project (I have also tried the "clean" action for the solution)
I have tried removing the Azure project all together and creating a new one from the current version of my project.
I have tried clearing the local storage through the Azure storage interface.
I have verified that all my content is marked as "Content" in my ASP.NET project.
I have tried flagging all of my content items as "Copy always"
I have verified that the Static Content optional feature is checked
EDIT: I did a deploy to the web and everything works great there ... this is an emulator issue it appears. Any suggestions with that new bit of info?
You should verify your web.config just to be sure. Do you see something like this?
<system.web>
<authorization>
<deny users="?" />
</authorization>
...
</system.web>
Did you put the [Authorize] attribute on some of your controllers, or your controller base?
If it works in the cloud and in ASP.NET Development Server, I am not very sure why it doesn’t work in emulator. However I don’t think the issue is related to your application. For now, I would like to suggest you to check your IIS settings, such as applicationHost.config. Please see if there’re any authorization settings that may cause this issue(Compute Emulator uses IIS under the hook to host web roles). Please also try to host the site in a local IIS directly and see if the same issue could be encountered. If you can reproduce this issue in IIS as well, I would recommend you to consider to add a “IIS” tag to this thread, so more IIS experts will provide further suggestions.
Best Regards,
Ming Xu.
This thread has been open for a long time so I wanted to close it with what ended up being the solution.
It ended up being a bug with the emulator and the environment being used. As I mentioned, I was able to get it working when deployed. I actually tried this same situation 6 months later after updating to the latest Azure tool set and it worked fine so I am chalking this up to a bug in the emulator that has since been resolved.

Resources