Click here to Skip to main content
12,999,157 members (42,397 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I am getting following error:

Invalid URI: The hostname could not be parsed.
When reading excel file using following code
ExcelWorksheet worksheet = xlPackage.Workbook.Worksheets[@"Sheet1"];
and that file have a cell which have email ids with mail to link.

Is there any code to remove link ?
Please help me how to resolve that error.

Best regards,
Cien System
Posted 26-Jun-13 9:13am
Sergey Alexandrovich Kryukov 26-Jun-13 15:16pm
OK, and what is that URI, exactly?
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Invalid URI: The hostname could not be parsed

when I start creating new sites, I start it up at my localhost.
Unfortunately, when I setup it up in production and link the domainname to it, the alias is localhost and on some modules that is a problem.
Now I found a solution by "tricking" the local DNS on my PC and refer the domainname of the site to localhost in my hosts file (windows/drivers/etc).

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Invalid URI: The hostname could not be parsed

I was having few hours of work-a-round when I was trying to Set-up/Deploy the DotNetNuke Environment at my local pc.
I restore the DB Backup of DNN, copied the source at my local pc drive and configured the Virtual Directory for the application.
I also made the changes in Web.Config file; that is Connection String related changes.

As we have to specify the Portal Alias in PortalAlias Table in DBB DataBase, I defined it as localhost/dnnapp (you need to make sure that this would be the first PortalAlias entry, like localhost/dnnapp; and Do not add the http:// part.

After all these settings, I hopefully tried to access the application with "http://localhost/dnnapp" URL; but I got one (it seemed to me a common error) error, "Invalid URI: The hostname could not be parsed". I again checked my DataBase Settings (UserID, pwd, PortalAlias etc.) , Web.Config Settings; but didn't get any success; except some variation in error message; that is "Page cannot be displayed". But the most common error I was having is of "Invalid URL: The hostname could not be parsed" only. Lastly, I attempted to stop IIS and start it again, and it worked finally. I am not sure that this is the solution of this error message but it worked for me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170622.1 | Last Updated 6 Apr 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100