SVN integration

Topics: Installing BugNET
Sep 14, 2012 at 9:33 PM

I moved my Bugnet installation to a new Windows 2008R2 server and ever since then I have been getting

 

ERROR - An error occurred adding a new issue revision to BugNET: The request failed with HTTP status 401: Unauthorized. 

    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at BugNET.SubversionHooks.WebServices.BugNetServices.CreateNewIssueRevision(Int32 revision, Int32 issueId, String repository, String revisionAuthor, String revisionDate, String revisionMessage)
   at BugNET.SubversionHooks.IssueTrackerIntegration.UpdateIssueTrackerFromRevision(String repository, String revision)
INFO - Finished IssueTrackerIntegration.UpdateIssueTrackerFromRevision

What can I do to get this fixed?

Oct 25, 2012 at 9:52 AM

I have absolutely same problem on W2008 R2 x64.

I am using AD authorization for SVN (VisualSVN server) and for BugNet (latest version available).

hooks.exe.config

<setting name="BugNetWindowsAuthentication" serializeAs="String">
                <value>True</value>

<setting name="BugNetUsername" serializeAs="String">
                <value>%domain%\administrator</value>
            </setting>

SVN is sending messages ok.

 

this is an error (from log file):

View Issue <a href="IssueDetail.aspx?id=2#top"><b>ProjectCode-2</b></a>

ERROR - An error occurred adding a new issue revision to BugNET: The request failed with HTTP status 401: Unauthorized.

    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at BugNET.SubversionHooks.WebServices.BugNetServices.CreateNewIssueRevision(Int32 revision, Int32 issueId, String repository, String revisionAuthor, String revisionDate, String revisionMessage)
   at BugNET.SubversionHooks.IssueTrackerIntegration.UpdateIssueTrackerFromRevision(String repository, String revision)
INFO - Finished IssueTrackerIntegration.UpdateIssueTrackerFromRevision

 

Oct 25, 2012 at 2:38 PM

When using windows authentication for the svn hooks, the username and password settings are not used and the account credentials that is running the process will be used.

Oct 25, 2012 at 4:28 PM

I am logged in as domain administrator. Domain administrator is also admin of the Bugnet system.

Everything is in one server.

VisualSVN server is started under networkservice account credentials. Is that the problem that networkservice should have access to the Bugnet?

Oct 25, 2012 at 4:32 PM

I was actually able to get this working by switching the authentication method from Negotiate(kerberos) to ntlm on the BugNet site.

Oct 25, 2012 at 10:16 PM

Please be more specific what to change where please.

 

Thanks

Oct 26, 2012 at 2:19 AM
Edited Oct 26, 2012 at 2:23 AM

whoops wrong thread

Oct 26, 2012 at 2:32 PM

Under the IIS settings

Choose your website that is running the BugNet application and then open up Authentication, and under the providers make sure that NTLM is listed as the first protocol on the list.

Oct 26, 2012 at 2:54 PM

Did it, still the same error. :-(

Any suggestions to check?

Oct 26, 2012 at 4:08 PM

It could be the user that your application pool is running under, if it is running not as a ad user but as a local system user that might cause it to not work correctly.

Oct 26, 2012 at 4:20 PM

BugNet app pool is running under network service. So should I change to some user and fill this user credentials to the BugNET.SubversionHooks.exe.config with <setting name="BugNetWindowsAuthentication" serializeAs="String">       <value>True</value>

?

Oct 26, 2012 at 4:33 PM

When windows authentication is enabled for the SVN hooks executable then the windows account that runs BugNET.SubversionHooks.exe will be passed to BugNET. For instance,  if I am logged on as mydomain\testuser and run the BugNET.SubversionHooks.exe then mydomain\testuser will be passed to BugNET.

In this case, mydomain\testuser needs to be in the BugNET database as a user and have access to the project you are trying to connect to.

Nov 1, 2012 at 10:48 AM

Windows Auth must be enabled on SVN hook, if not, SVN is complaining with 401 code during the commit.

 

What I did:

bugnet application pool started under domain\admin

svn service started under domain\admin

svnhooks - set to win auth, credentials domain\admin

logged in to the server as domain\admin

SVN coming change fired by domain\admin

domain\admin has access rights to the project in BugNet

IIS set to NTLM

still error

 

 

Nov 20, 2012 at 3:45 PM

Upgraded to 1.2.x - still the same problem.

And there are undocumented values in config in new version - like SQL connection string etc.

Anyway, I am getting still the same error - everything is running on domain admin account (pool, SVN service).

 

Can you please fix?

Aug 30, 2013 at 11:19 AM
1.5 - still same bug

please let me know how to fix this?
Aug 30, 2013 at 11:41 AM
FIXED:

you need to disable loopback check for local IIS websites

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0

create multistring key BackConnectionHostNames
and insert your BTS url there
  • reset IIS Admin SVC
WORKING!