Last post Mar 14, 2017 04:35 AM by KathyW
Mar 08, 2017 01:41 PM|Lexi85|LINK
I have got a strange issue her which i never came across before....I have this application in which diffrent webforms....all webforms work fine when I click show in browser except 1....when ever I try to run this webform it comes up as error
This page can’t be displayed
•Make sure the web address http://localhost:5392 is correct.
•Look for the page with your search engine.
•Refresh the page in a few minutes.
I tried to create new webform copied evrything from previous one and run it and again the same...why is it m unable to a ccess this webform from this application
Mar 08, 2017 02:50 PM|march11|LINK
Can you paste some of the code into this thread so we can try and see what is going on? the ASP.net page header, and any code behind events would be helpful.
Mar 08, 2017 03:00 PM|mgebhard|LINK
The Visual Studio web server must be up and running first. That's why view in browser works form Visual Studio.
You can use Visual Studio to setup a virtual directory in IIS and host your app so it is always available. Assuming you have IIS installed and configure on your development system.
Mar 09, 2017 05:41 AM|Eric Du|LINK
According to your description, I suggest you could right click this page, then click set as start page.
Also, here are some tutorials about how to resolve this problem, please check:
"Page Cannot be Displayed" or "Web Page Unavailable Offline" When You Browse to
"Internet Explorer cannot display the webpage" error:
Mar 09, 2017 06:02 AM|ShivaKarthik|LINK
please try resetting IIS by using the command IISRESET and try again.
Mar 13, 2017 08:03 AM|Lexi85|LINK
I did..doesnt work...
when I say fix connection problems on browser..it shows message..
the remote device or resource won't accept the connection.
Also I can open http://localhost but not http://localhost:anyportnumber
Mar 13, 2017 10:21 AM|mgebhard|LINK
Mar 13, 2017 10:27 AM|Lexi85|LINK
Hello thank..yes I did that
it doen't work...
I tried to create a new webapp...added two files..one existing webform and other new...the first webform doesnt work.....in the 2nd webform I just put one label and clicked on "View in IE" it worked fine...but the webforms with database connections on page
load dont work..I still get message saying This page can't be displayed.
Mar 13, 2017 11:21 AM|mgebhard|LINK
Visual Studio comes with a web server. It is called IIS Express. By default when you click run IIS Express will start and host the application. The telltale sign that IIS Express is hosting the app is a port number at the end of localhost. If you started
the project with debug and are using IE, closing the browser also stops the IIS Express - as far as I recall.
You have another web server on your computer; IIS. If you host the application in IIS then the app is always available regardless if Visual Studio open or not. You can configure Visual Studio to use IIS by going to the project properties then selecting
the Web tab. From there select Local IIS and click the create virtual directory button. The next time you start the project it will be host by IIS where you will see localhost/TheWebApplicationName/ in the browser's address bar. This might cause unexpected
issue if you did not use relative references in your project due to the "TheWebApplicationName" being added to the URL.
Hello thank..yes I did that
Then you did something wrong. You might want to visit IIS support for further assistance.
Mar 13, 2017 12:14 PM|Lexi85|LINK
One query which I have is...if it is an iis issue..other webpages shouldn't be open too...but I tried to create new webform and bind data to gridview and it worked perfectly fine.
could there be problem with just one page
Mar 13, 2017 12:39 PM|Lexi85|LINK
I have got below code in my webpage on page load...when I comment these lines..the page comes up...when I uncomment these lines it says page not found...;-(
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' If Not IsPostBack Then
' Dim dt As DataTable = GenerateSampleData()
'AddNodes(-1, TreeView1.Nodes, dt)
Private Sub AddNodes(id As String, tn As TreeNodeCollection, dtTree As DataTable)
'For Each dr As DataRow In dtTree.[Select]((Convert.ToString("OriginalParentUID = '") & id) + "'")
' Dim [sub] As New TreeNode(Convert.ToString(dr("description")), Convert.ToString(dr("OriginalUID")))
' AddNodes(Convert.ToInt32([sub].Value), [sub].ChildNodes, dtTree)
Private Function GenerateSampleData() As DataTable
'Dim dtResult As New DataTable()
'Using sqlConn As New SqlConnection(ConfigurationManager.ConnectionStrings("constr1").ConnectionString)
' Using sqlCmd As New SqlCommand("SELECT OriginalUID, description, ISNULL(OriginalParentUID,-1) As OriginalParentUID FROM PeopleF", sqlConn)
' sqlCmd.CommandType = CommandType.Text
' Dim ad As New SqlDataAdapter(sqlCmd)
' End Using
Mar 13, 2017 12:55 PM|PatriceSc|LINK
The EXACT error is? Do you mean you have now a 404 error page not found at the browser level? Or could it be some other "page" related issue (compilation error because of a Page property error or whatever). Also try perhaps F12 first to see what is the response
from the server. If you have a 500 status code you have an exception server side.
The first point even before trying to solve the problem is to first understand what is the exact problem you have.
Ah, what if you comment just the AddNodes call into your AddNodes method ? Could it be that you have an unexpected cycle into your data or something like that ?
Edit: or this is a db error.For now it seems you have some kind of exception but that it doesn't show up for some reason (unless a problem with the node stuff that would be caught into an endless loop ?)
Mar 13, 2017 01:15 PM|mgebhard|LINK
Have you tried setting a break point and systematically steeping through your code? Start with un-commenting GenerateSampleData(). Then place a break point on...
Dim dt As DataTable = GenerateSampleData()
When the debugger stops on the line above press F11 and step to the next line of code. Do the same for AddNodes() once you have verified or fixed GenerateSampleData().
Mar 14, 2017 04:35 AM|KathyW|LINK
"it worked fine...but the webforms with database connections on page load dont work"
If this is the distinction - pages with no database connection work, but pages with a database connection do not?
Can you clarify that this is indeed the distinction between working and non-working pages? If it is, can you try a trivial case: drag an SQLDataSource onto the page, drag a GridView onto the page, and wire them up in Design View: does that page work?
If not, what errors do you get? Can you connect to your database?