Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2003, 01:40 AM
Authorized User
 
Join Date: Nov 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default VC.NET project questions

I'd like to use a Frameset in an application for some, but not all of the pages. Can this be done?

Is it possible to have more than 1 project in a given solution? Would the two share the same session?

Is it possible to have more than 1 document in a given application? Would the two share the same session?

If there are two directories on a site server for the same domain name, can a user switch between the two? Would the two share the same session?

In the past I'd deleted a directory on my local C drive that used Web Sharing and contained a VC.NET project. I'd like to create another directory of the same name for for a VC.NET project but when I try to turn on WEb Sharing for it a message says that this name already exists in LM/W3SVC/1/Root/project_name. Where is this and how can I get rid of it?

Is there a correct way to delete a project that does not lead to these problems? Can a project be deleted from inside VC.NET?



Sandra MacGregor
__________________
Sandy
 
Old December 5th, 2003, 10:41 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can use framesets for which ever pages you wish. That's just a matter how you write the HTML. If you need help with that, there are loads and loads of online resources with samples on how to create framesets and how to manipulate them to serve your needs.

A solution can have many projects. Each web project is created as a separate virtual directory in IIS so I don't think they can share the native .net session.

By more than 1 document do you mean more than 1 page (ASPX)? Most certainly. You can have as many ASPXs as you like. Because they live in the same project, they will shared session information.

I'm not sure what you mean by "two directories on a site server for the same domain name". Everything that runs within a single web project will share session data.

"LM/W3SVC/1/Root/project_name" is the metadata name for the web or virtual directory. This is handled thru IIS manager. Usually you can not delete a directory that is using web sharing as it would corrupt the metadata for IIS. You have to disable web sharing and then remove the directory. It's possible you are getting this error because the web/directory already exists in IIS, but the physical source was removed (because you deleted it). Check IIS manager and see if anything looks like the directory you are trying to use. Try deleting it.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old December 5th, 2003, 03:41 PM
Authorized User
 
Join Date: Nov 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Peter,

It's great to have your help. I probably asked too many questions at once. I'll take them in order.

1. Framesets. No having any trouble creating the frameset. It has 2 frames, one on the left for the navigation buttons, one on the right for the pages. The navigation page contains <BASE target="main"> and the frame on the right is named "main".
Please point me to some helps as to how to exclude some of the pages from "main".

2. Understood.

3. Yes, but someplaces in MS help it seems to refer to all the pages together as 1 document, unless I understand it wrong.

4. Understood. (Rats!)

5. This directory does not show up in IIS Default Web Site. Is there any way to remove the error I created.
Thanks for telling me how to do it correctly.



Sandra MacGregor
 
Old December 5th, 2003, 04:10 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

1. Again, this is an issue with HTML/frames and javascript. If you want a page to NOT be in a frameset, then you could do one of several things:
A) make all links that go to that page specify the link target to be "_top" to drop the frameset
B) write javascript in the page itself that checks to see if the document's parent window is the same as the "top" window (I think the syntax is "document.window != document.window.top"). If the window objects aren't the same then the page is framed, so do a javascript redirect to the page's URL (set location.href to the page URL). You can do the same but in reverse for a page that SHOULD be framed but isn't.

3. I'm curious as to what MS help you have seen that refers to the pages as a single document. (I've never seen MS refer to aspx pages as documents to boot!)

5. If the IIS metadata is hosed, you are pretty much screwed. It's not an easy thing to fix. It's all buried in the registry, but I wouldn't advise messing with that! There might be some tools to fix it. I can't think of any off the top of my head.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old December 5th, 2003, 04:28 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can take a look at Meta Edit: http://support.microsoft.com/default...en-us%3B232068

Also, because all you did was remove the physical folder, the Virtual Folder may still be there, not under the Default Web site, but maybe under a different site, preventing you from creating a new Web project. To check this, open the Internet Information Services Management Console (can you say that 10 times in succession rapidly??) and check for any remainders of your site.
Otherwise, check out the MetaEdit tool to delete any old stuff

HtH,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 5th, 2003, 05:20 PM
Authorized User
 
Join Date: Nov 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1. Thanks, that works marvelously. I added target="_top" to the <A href=. This brings up another problem. On the page that is now displayed as _top there is a link to return to the previous page and now the previous page is also displayed as _top. I added target="_parent" to this link and that prevents it from opening another window, but does not return to the frameset. (Using the 'back' button does return to the frameset.) I there a way to add a second target="main"?

3. I reread the helps on "Document" and now understand them differently.

5. I've now looked in every folder in the Default Web Site in the IIS Management Console and the name is not there. (I sure have a lot more than I thought and need to clean it out.) Next I'll check out the MetaEdit tool

You're help is super.


Sandra MacGregor
 
Old December 5th, 2003, 05:32 PM
Authorized User
 
Join Date: Nov 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1. I've tried putting the URL for the return in the <A href="http://localhost/NoLimit/NavFrameset.htm/Catalog.htm" but this results in a Page Not Available error. The actual URL when the desired page is present is:
http://localhost/NoLimit/NavFrameset.htm
which is the same URL on every page in the frameset. But when I return to that page I get the frameset with the Startup page.
What should I try next?



Sandra MacGregor
 
Old December 5th, 2003, 06:41 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What you can do is ... oh dear. I just noticed your frameset page, it's HTML.

You'll need a script-able version of the frameset page so you can provide it with a "main" frame destination. If you use the javascript "am I framed?" logic, then you could link directly to the page you want, then redirect to the frameset with the destination:

http://localhost/NoLimit/NavFrameset...st=Catalog.htm

The frameset page could check that querystring value and if there's something in it then it would draw up the frameset with the destination as the "Main" frame source instead of the default page.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old December 5th, 2003, 07:07 PM
Authorized User
 
Join Date: Nov 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Peter,

I've never used javascript before. I've written this:
<script language="JavaScript">
   function changeFrameCatalog()
   {
  alert (document.all.main.src); document.all.main.src="http://localhost/NoLimit/Catalog.htm/";
  alert (document.all.main.src);
   }
</script>
which I copied from microsoft help and inserted in the HEAD portion. Then I called it by inserting:
changeFrameCatalog();
just before the <a href="../NavFrameset.htm" target="_parent">. What have I done wrong?
If I need to rewrite the NavFrameset.htm page in .asp I'm in trouble.
Whoops! I'll try it without the ;.

Thank you very much for your quick responses.



Sandra MacGregor
 
Old December 5th, 2003, 07:20 PM
Authorized User
 
Join Date: Nov 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Peter,

I created the frameset in VS.NET. Isn't there some way to change the frame source in .NET? But I havent found one. Also I've not found .NET's ability to create .asp framesets.



Sandra MacGregor





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use interface in VC++.NET smartravi Visual C++ 0 February 28th, 2006 10:01 AM
VC++ .NET mindyjeanne Visual C++ 1 August 22nd, 2005 02:22 PM
convert VC++ 5.0 project to VC++ 6.0 MIDL ERR mdahd90943 Visual C++ 0 May 26th, 2005 08:57 AM
vc.net c2065 davidwong C++ Programming 1 October 8th, 2004 01:36 PM
DLL in VC#.NET sachin-csharp .NET Framework 2.0 1 August 23rd, 2004 11:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.