tag:support.hglabhq.com,2012-10-18:/discussions/problems/343-invalid-uri-the-hostname-could-not-be-parsedHgLab: Discussion 2018-10-19T08:11:28Ztag:support.hglabhq.com,2012-10-18:Comment/290919672013-09-30T03:23:13Z2013-09-30T03:23:13ZInvalid URI: The hostname could not be parsed.<div><p>Charles,</p>
<p>Could you provide a stacktrace for this error (or all the text
on a yellowish error page)?</p>
<p>Also, what are the names/slugs of your project and
repository?</p>
<p>On 30.09.2013, at 5:22, "charles" <a href=
"mailto:tender2+dbd50ebcda3054f7cc2e810276ea3c6a2348c17f9@tenderapp.com">
tender2+dbd50ebcda3054f7cc2e810276ea3c6a2348c17f9@tenderapp.com</a>
wrote:</p></div>Anton Gogolevtag:support.hglabhq.com,2012-10-18:Comment/290919672013-10-01T01:09:52Z2013-10-01T01:09:52ZInvalid URI: The hostname could not be parsed.<div><p>Project Name: Test Project<br>
Project Slug: testproject<br>
Repository Name: MyTest</p>
<p>Same error using an imported (copied) repository named SC
Test.</p>
<p>URLs:<br>
<a href=
"http://servername:8050/projects/testproject/repositories/mytest/source/files">
http://servername:8050/projects/testproject/repositories/mytest/sou...</a><br>
<a href=
"http://servername:8050/projects/testproject/repositories/sc%20test/source/files">
http://servername:8050/projects/testproject/repositories/sc%20test/...</a></p>
<p>If you need to know my server name, let me know. I'd prefer to
send that<br>
privately.</p>
<p>Thanks for your quick reply. I'm excited about HgLab, having
suffered<br>
through installing Mercurial to work in IIS.</p>
<p>Stack Trace:</p>
<p>[UriFormatException: Invalid URI: The hostname could not be
parsed.] System.Uri.CreateThis(String uri, Boolean dontEscape,
UriKind uriKind) +8917178<br>
System.UriBuilder.get_Uri() +80
HgLab.Core.Framework.Web.DynamicRouteGenerator.GetRouteInternal(String
name, String[] argNames, Object[] argValues) in<br>
c:\Projects\hglab\src\HgLab.Core\Framework\Web\DynamicRouteGenerator.cs:78<br>
HgLab.Core.Framework.Web.DynamicRouteGenerator.GetRoute(String
name, String[] argNames, Object[] argValues) in<br>
c:\Projects\hglab\src\HgLab.Core\Framework\Web\DynamicRouteGenerator.cs:44<br>
HgLab.Core.Framework.Web.DynamicRouteGenerator.TryInvokeMember(InvokeMemberBinder
binder, Object[] args, Object& result) in<br>
c:\Projects\hglab\src\HgLab.Core\Framework\Web\DynamicRouteGenerator.cs:38<br>
CallSite.Target(Closure , CallSite , Object , String , String ,
String ) +303
System.Dynamic.UpdateDelegates.UpdateAndExecute4(CallSite site, T0
arg0, T1 arg1, T2 arg2, T3 arg3) +1097<br>
ASP._Page_Areas_Project_Views_Repository__Toolbar_cshtml.Execute()
in
c:\Projects\hglab\src\HgLab\Areas\Project\Views\Repository_Toolbar.cshtml:10<br>
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext
pageContext, TextWriter writer, WebPageRenderingBase startPage)
+173<br>
System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper
htmlHelper, String partialViewName, Object model) +116<br>
ASP._Page_Areas_Project_Views_Repository_Files_cshtml.b__e() in
c:\Projects\hglab\src\HgLab\Areas\Project\Views\Repository\Files.cshtml:15<br>
System.Web.WebPages.<>c__DisplayClassb.b__9(TextWriter tw)
+289<br>
System.Web.WebPages.WebPageBase.Write(HelperResult result) +89
ASP._Page_Areas_Project_Views_Shared__Layout_cshtml.Execute() in
c:\Projects\hglab\src\HgLab\Areas\Project\Views\Shared_Layout.cshtml:90<br>
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext
pageContext, TextWriter writer, WebPageRenderingBase startPage)
+173<br>
System.Web.WebPages.WebPageBase.Write(HelperResult result) +89
System.Web.WebPages.WebPageBase.RenderSurrounding(String
partialViewName, Action<code>1 body) +234
System.Web.WebPages.WebPageBase.PopContext() +234
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext
context) +378
System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
+33
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter
filter, ResultExecutingContext preContext, Func</code>1
continuation)<br>
+727120
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext
controllerContext, IList`1 filters, ActionResult actionResult)
+265<br>
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext
controllerContext, String actionName) +727076<br>
System.Web.Mvc.Controller.ExecuteCore() +159
System.Web.Mvc.ControllerBase.Execute(RequestContext
requestContext) +334
HgLab.Core.Framework.Web.HgLabControllerBase.Execute(RequestContext
requestContext) in<br>
c:\Projects\hglab\src\HgLab.Core\Framework\Web\HgLabControllerBase.cs:69<br>
System.Web.Mvc.<>c__DisplayClassb.b__5() +62
System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +15
System.Web.Mvc.<>c__DisplayClasse.b__d() +52
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+606 System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) +288</p></div>charlestag:support.hglabhq.com,2012-10-18:Comment/290919672013-10-01T01:24:03Z2013-10-01T01:24:46ZInvalid URI: The hostname could not be parsed.<div><p>I tried setting HgLab to a new, empty repository folder and got
the error below.</p>
<p>When I first set up the site, I chose a folder that had my
existing repositories in it. When I saved, I was prompted to
upgrade (though the version numbers were the same). In that
original folder, the structure ended up like this:<br>
repo<br>
|_data |_repositories |_master |_testproject |_MyTest |_SC Test</p>
<p>The new folder failed to update with a permissions error. I
think I fixed the permissions, but keep getting prompted to
upgrade. I can't even log off.</p>
<p>HgLab.Core.Framework.Servicing.ServicingException: Could not
perform Upgrade from version 0.3.10.0 to version 0.3.10.0 --->
HgLab.Core.Framework.Servicing.ServicingException: Could not
execute TransactionalTask for running version 0.3.10.0 and target
version 0.3.10.0 --->
HgLab.Core.Framework.Servicing.ServicingException: Could not
execute HomeDirectoryVersionRegistrationTask for running version
0.3.10.0 and target version 0.3.10.0 --->
System.UnauthorizedAccessException: Access to the path
'D:\ServerFolders\Business\hglab.hglab.version' is denied.<br>
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath) at System.IO.FileStream.Init(String path, FileMode
mode, FileAccess access, Int32 rights, Boolean useRights, FileShare
share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES
secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath,
Boolean checkHost) at System.IO.FileStream..ctor(String path,
FileMode mode, FileAccess access, FileShare share, Int32
bufferSize, FileOptions options, String msgPath, Boolean
bFromProxy, Boolean useLongPath, Boolean checkHost) at
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding
encoding, Int32 bufferSize, Boolean checkHost) at
System.IO.File.InternalWriteAllText(String path, String contents,
Encoding encoding, Boolean checkHost) at
HgLab.Core.Framework.Servicing.Impl.HomeDirectoryVersionRegistrationTask.InternalExecute(Version
runningVersion, Version targetVersion) in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\HomeDirectoryVersionRegistrationTask.cs:line
18 at HgLab.Core.Framework.Servicing.Task.Execute(Version
runningVersion, Version targetVersion) in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Task.cs:line
21 --- End of inner exception stack trace --- at
HgLab.Core.Framework.Servicing.Task.Execute(Version runningVersion,
Version targetVersion) in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Task.cs:line
30 at
HgLab.Core.Framework.Servicing.Impl.TransactionalTask.InternalExecute(Version
runningVersion, Version targetVersion) in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\TransactionalTask.cs:line
20 at HgLab.Core.Framework.Servicing.Task.Execute(Version
runningVersion, Version targetVersion) in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Task.cs:line
21 --- End of inner exception stack trace --- at
HgLab.Core.Framework.Servicing.Task.Execute(Version runningVersion,
Version targetVersion) in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Task.cs:line
30 at
HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.ExecuteTaskSequence(IEnumerable`1
taskSequence, Version runningVersion, Version targetVersion) in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line
64 at
HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.PerformUpgrade()
in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line
111 --- End of inner exception stack trace --- at
HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.PerformUpgrade()
in
c:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line
120 at
HgLab.Areas.Dashboard.Controllers.UpgradeController.Upgrade(UpgradeModel
model) in
c:\Projects\hglab\src\HgLab\Areas\Dashboard\Controllers\UpgradeController.cs:line
42</p></div>charlestag:support.hglabhq.com,2012-10-18:Comment/290919672013-10-01T09:29:29Z2013-10-01T09:29:29ZInvalid URI: The hostname could not be parsed.<div><p>Charles,</p>
<p>What is the login you're using to sign in to HgLab?</p>
<p>As for "Upgrading from 0.3.10 to 0.3.10" - this is "by design",
albeit not particularly friendly "design". You can try running
these commands in a Privileged Command Prompt:</p>
<pre>
<code>icacls {hglab-home-directory} /t /remove:g iis_iusrs
icacls {hglab-home-directory} /grant iis_iusrs:(OI)(CI)(F)</code>
</pre>
<p>and then click "Upgrade" and wait for HgLab to complete. If it
doesn't complete in a reasonable time, create a file named
<code>.hglab.version</code> and containing <code>0.3.10</code> in
your <code>{hglab-home-directory}</code>.</p></div>Anton Gogolevtag:support.hglabhq.com,2012-10-18:Comment/290919672013-10-02T01:44:22Z2013-10-02T01:44:22ZInvalid URI: The hostname could not be parsed.<div><blockquote>
<p>What is the login... I'm using my email address as my login.</p>
</blockquote>
<p>Running the icals commands took care of the permissions issue,
and the site "upgraded" quickly.</p>
<p>To test with the new, empty repository folder, I deleted the
existing repository/project records in the database.</p>
<p>Given your question, I also did some testing. Apparently, if
Login is an email address, the error occurs. (Or maybe, if Login is
same as email.) If login isn't an email, I can log in and view
repositories just fine.</p>
<p>A few initial thoughts, besides the bug(?) of the login.</p>
<ol>
<li>The documentation isn't exactly accurate when it comes to the
folder structure.<br></li>
<li>Adding existing repositories isn't as easy as copying the
folder. It also has to be added via Add Repository.<br></li>
<li>I can change the home directory, but there's not
synchronization with the database.</li>
</ol>
<p>The sync issue is probably the biggest. It's going to be hard to
make that work unless the site:<br>
1. Joins home-directory to project or repository.<br>
2. Has a "resync" feature or utility that looks for changes between
the database and the folders.</p>
<p>I wonder if maintaining project/repository data is needed? The
regular Mercurial server can be configured to allow a nested folder
structure, which is something I was using. Would you be able to
dynamically read the folders, but still maintain your other
features (security, pull requests, etc.)?</p>
<p>As much as I like the site, it may not meet my needs. If I have
the time, I may pull and look at your source and see whether I have
any useful contribution to make.</p>
<p>Critique aside, I love the work you're doing. Mercurial in IIS
just shouldn't be as hard as it is, and you're making it
better.</p></div>charlestag:support.hglabhq.com,2012-10-18:Comment/290919672013-10-02T05:35:23Z2013-10-02T05:35:23ZInvalid URI: The hostname could not be parsed.<div><p>Charles,</p>
<p>There's a bug in 0.3.10 when using an email address as your
login triggers an error on certain pages. That one is fixed in a
newer version which is long due to be released.</p>
<p>As for the home directory, that's a tough one (well, except
documentation, which is something I've been neglecting for a
while). It is generally not encouraged to tinker with directly,
since it's supposed to be managed by HgLab itself. True, adding
existing repositories can be a bit cumbersome, but streamlining
this process is on my todo list. The "official" way is to add an
empty repository via web interface and then push to it.</p>
<p>Having a "Resync Repositories" feature (automatic or manual) is
nice, but it would imply encouraging direct access to Home
Directory. That's bothersome since there will be a lot more stuff
stored there (like Mercurial-backed wikis, forks, attachment blobs,
etc) and there's a non-zero chance of screwing things up in the
process.</p>
<p>Thanks for offering contributions, but HgLab is not exactly
open-source (HgSharp is) and I'm planning on building a business
around it.</p>
<p>Oh, and thanks for the kind words!</p>
<p>On 02.10.2013, at 5:44, "charles" <a href=
"mailto:tender2+dbd50ebcda3054f7cc2e810276ea3c6a2348c17f9@tenderapp.com">
tender2+dbd50ebcda3054f7cc2e810276ea3c6a2348c17f9@tenderapp.com</a>
wrote:</p></div>Anton Gogolevtag:support.hglabhq.com,2012-10-18:Comment/290919672013-10-02T12:58:41Z2013-10-02T12:58:41ZInvalid URI: The hostname could not be parsed.<div><p>I'll look forward to the next version. I'm definitely not
finished<br>
evaluating HgLab. Best wishes on your business.</p>
<p>Regarding changing home directories, from an installer/admin
point of view<br>
it would help to get a warning or other help that says something
like,<br>
"Changing your home directory is intended for situations where
you're moving your repositories...."</p>
<p>Also, while "auto sync" doesn't sound like a good fit, you could
have a<br>
feature for new installations where the site reads a copied
repository<br>
folder and creates projects/repositories from that. It would assume
one<br>
level of project-repository. Unless, of course, you build support
for<br>
nested projects, which would be awesome.</p>
<p>I see the above as an attractive installation/configuration
option for<br>
people who want to switch to HgLab from an existing Mercurial
installation.</p>
<p>Thanks, again, for all your help.</p></div>charles