Crash while clicking on a newly created repository. (Ver 0.3.10). Invalid URI: The hostname could not be parsed.

Karthik's Avatar

Karthik

07 Aug, 2013 02:40 AM

Steps to reproduce.
Create a new project and a new repository inside the project. Click on the repository.

While clicking on the repository, I am redirected to http://192.168.1.127/hglab/projects/slugfest/repositories/helloworld/source/files/650c725f2f34 which I believe does not exist.

Server Error in '/hglab' Application.

Invalid URI: The hostname could not be parsed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UriFormatException: Invalid URI: The hostname could not be parsed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[UriFormatException: Invalid URI: The hostname could not be parsed.]
   System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) +8055887
   System.UriBuilder.get_Uri() +80
   HgLab.Core.Framework.Web.DynamicRouteGenerator.GetRouteInternal(String name, String[] argNames, Object[] argValues) in c:\Projects\hglab\src\HgLab.Core\Framework\Web\DynamicRouteGenerator.cs:78
   HgLab.Core.Framework.Web.DynamicRouteGenerator.GetRoute(String name, String[] argNames, Object[] argValues) in c:\Projects\hglab\src\HgLab.Core\Framework\Web\DynamicRouteGenerator.cs:44
   HgLab.Core.Framework.Web.DynamicRouteGenerator.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result) in c:\Projects\hglab\src\HgLab.Core\Framework\Web\DynamicRouteGenerator.cs:38
   CallSite.Target(Closure , CallSite , Object , String , String , String ) +314
   System.Dynamic.UpdateDelegates.UpdateAndExecute4(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) +1097
   ASP._Page_Areas_Project_Views_Repository__Toolbar_cshtml.Execute() in c:\Projects\hglab\src\HgLab\Areas\Project\Views\Repository\_Toolbar.cshtml:10
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173
   System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName, Object model) +103
   ASP._Page_Areas_Project_Views_Repository_Files_cshtml.<Execute>b__e() in c:\Projects\hglab\src\HgLab\Areas\Project\Views\Repository\Files.cshtml:15
   System.Web.WebPages.<>c__DisplayClassb.<RenderSection>b__9(TextWriter tw) +211
   ASP._Page_Areas_Project_Views_Shared__Layout_cshtml.Execute() in c:\Projects\hglab\src\HgLab\Areas\Project\Views\Shared\_Layout.cshtml:90
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +209
   System.Web.WebPages.WebPageBase.PopContext() +222
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +33
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +691
   System.Web.Mvc.Controller.ExecuteCore() +162
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
   HgLab.Core.Framework.Web.HgLabControllerBase.Execute(RequestContext requestContext) in c:\Projects\hglab\src\HgLab.Core\Framework\Web\HgLabControllerBase.cs:69
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

  1. 1 Posted by Karthik on 07 Aug, 2013 07:07 AM

    Karthik's Avatar

    PFA elmah.mvc dump. Maybe its because of my machine name. WIN-O7OKEN0VPTL
    Will keep you posted if I figure something out.

  2. Support Staff 2 Posted by Anton Gogolev on 07 Aug, 2013 07:29 AM

    Anton Gogolev's Avatar

    Hi!

    Under "Administration" - "General", what is the value of "Site URL" parameter?

  3. 3 Posted by Karthik on 07 Aug, 2013 08:45 AM

    Karthik's Avatar

    http://WIN-O7OKEN0VPTL/hglab is the value where WIN-O7OKEN0VPTL is my server name. I tried changing it to the machine ip address but still got the same error.

  4. Support Staff 4 Posted by Anton Gogolev on 07 Aug, 2013 09:01 AM

    Anton Gogolev's Avatar

    Yep, these should not cause any issues.

    What is the exact login you're using to sign in to HgLab?

  5. 5 Posted by Karthik on 07 Aug, 2013 09:29 AM

    Karthik's Avatar

    I have used my email id as the login name. [email blocked] is the user name.

  6. Support Staff 6 Posted by Anton Gogolev on 07 Aug, 2013 09:39 AM

    Anton Gogolev's Avatar

    Aha, so that's the problem. Actually, the problem is lack of validation and escaping on my end, but nevertheless.

    What's happening is HgLab tries to construct a Clone URL that has your login as a part of it, i.e. http://[email blocked]@192.168.1.127/hglab/hg/slugfest/helloworld ( see http://www.cs.rutgers.edu/~watrous/user-pass-url.html ), and doesn't escape the first @ sign.

    I'll be fixing this in an upcoming release, but for the time being you can execute the following SQL statement against HgLab database:

    update [User] set [Login] = N'karthik' where [Login] = N'[email blocked]'
    

    This will change your login to karthik and HgLab will be much happier with that.

  7. 7 Posted by Karthik on 07 Aug, 2013 09:46 AM

    Karthik's Avatar

    Got it working!! Thanks for the support.

  8. Support Staff 8 Posted by Anton Gogolev on 07 Aug, 2013 10:01 AM

    Anton Gogolev's Avatar

    Glad I could help! Have a nice day and do contact me in case something else goes awry.

  9. Anton Gogolev closed this discussion on 07 Aug, 2013 10:01 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Jan, 2025 05:02 PM
13 Jan, 2025 10:42 AM
29 Nov, 2024 10:00 AM
12 Jan, 2023 12:25 PM
10 Jan, 2023 04:49 PM