Dart Home | PowerTCP WebServer for ActiveX | Custom Development | Reply | PowerTCP WebServer for ActiveX Topics | Forums |
Author | Forum: PowerTCP WebServer for ActiveX Topic: WebServer does not recognize a FOLDER in URL |
jplavocos From: Heber City, UT USA Posts: 7 Member Since: 11/28/03 |
posted November 28, 2003 3:19 AM Try the standard WebServer sample provided by Dart. Add a new folder with an index.htm file in the directory where WebServer's root is. Then simply put the following in your URL. http://localhost/mynewfolder WebServer CAN'T FIND IT. ONLY when you type in http://localhost/mynewfolder/ (with ending forward slash) it can then get the default file in that folder called index.htm. ALL OTHER WEB SERVERS in the market accomodate a folder search if a file is not found and it is NOT necessary to have an ending forward slash on it. Please advise if anyone is dealing with this simple issue. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 30, 2003 4:02 PM If the file requested does not end with "/" then we assume it's a file. There is no searching done. That would be something you would add yourself via the Get event. If you want this feature added, please contact our sales department directly via email (sales@dart.com) or phone (315-790-5456) |
jplavocos From: Heber City, UT USA Posts: 7 Member Since: 11/28/03 |
posted December 1, 2003 11:26 PM Thanks Tony, It is something you should mention because every web server in the industry handles this simple search for folder if file not found. I have added code in the get that does a redirect with the forward slash added and then comes through again. Just pretty silly to create extra overhead when the Dart WebServer control could have 1 more line of code to search for a folder if it is not a file. Thanks for your time. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 1, 2003 11:36 PM Thanks for posting the workaround! |
jplavocos From: Heber City, UT USA Posts: 7 Member Since: 11/28/03 |
posted December 2, 2003 10:48 PM Put this code in the WebServer1_Get If Right(Request.FileName, 1) <> "/" And InStr(1, Request.FileName, ".", vbTextCompare) = 0 Then Call SendRedirectPage(Response, "http://" & VHost & Request.FileName & "/") Exit Sub End If This simply redirects back into WebServer1_Get so Dart can understand that it is a folder. SendRedirectPage is a funtion that simply writes back a redirect page. VHost is a function that loops through header info to get the host name. Again alot of silly overhead for 1 line of code if anyone at Dart has some time. |
Alex Gladshtein![]() From: Rome, NY USA Posts: 131 Member Since: 12/27/00 |
posted December 3, 2003 9:15 AM Hello, Thanks for taking the time to work with our product. You have to realize that the WebServer Tool is not designed to be a plug-in replacement for a full-fledged Web Server such as IIS. It is designed to be a building block so that programmers can build their own custom Web Server functionality into an application. Our goal was to handle some of the commonly used lower-level protocol aspects of a Web Server, but leave the high-level functionality up to the user, as that tends to be highly specific to a particular project. There are always features that can be added to a product, but moving too far from a basic design philosophy can create problems in usability and ease-of-use. We are always open to suggestions and do have custom development options for customers that require something special, but for the most part, our customer-base has been happy with the design decisions we have made with the product. Thanks again for using our product. We appreciate your comments and will take them under consideration in future revisions. Regards, Alex Gladshtein Product Manager |
Reply | PowerTCP WebServer for ActiveX Topics | Forums |
This site is powered by
![]() |