Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Ok Actually it works, but only with applications that are configured as an application in IIS, except for the defaut application root. Let me explain myself:

 

mySiteApplication is the defaut web site in IIS, windows XP. The files are in «C:\Inetpub\wwwroot\mySiteApplication». This is the root directory setup in IIS. In that case, user control DO NOT compile them-self in the bin directory.

 

webApplication1 is an application within mySiteApplication web site. The files are in «C:\Inetpub\wwwroot\mySiteApplication\webApplication1\». In that case, no problem with user-controls.

 

Strange huh? :eek:

Posted

Here's a printscreen of the references:

 

http://www.vooral.com/images/demo.jpg

 

the namespace vooral.controls.validation cannot be found when page.aspx is running, even though it's in the references.

 

I am wondering what am I supposed to see in the Bin directory. Right now, the only DLL I have is vooral.dll (+ vooral.pdb). Is this correct?

Posted

I tried this on another computer. The same thing happens. When I try to create a web application directly in the root, it doesn't work.

 

IIS:

 

-My computer-->web sites-->default web site (here's my application)

 

 

The files:

 

C:\Inetpub\wwwroot\vooral (the web site root points to this folder)

Posted

Maybe the probleme comes from the fact that I tried to create a web application directly in the root. In visual studio, with the wizard, when I try to create a web application, the default path is:

 

http://localhost/WebApplication1

 

The problem is that I dont want to create an application. I want to create a web site. I know a web site is an «application», but I want my application to be in the root. Therefor, I would like to have my project built directly in the http://localhost/. I want my default web site to point directly to this application. Since my domain name points to my IP, I dont want my clients to see: "www.myWebSite.com/webapplication1/index.aspx" in IE. I want them to browse directly to "www.myWebSite.com".

 

This is why I changed IIS setting, after having my project created in VS.net. I changed the root folder in IIS so that my default web site would point to c:/inetpub/wwwroot/webapplication1.

 

Maybe I mixed-up a lot of things :confused:

  • Administrators
Posted

Just to clarify - are you using 'Web User Controls' (the ones with an .ascx extension)? If so these are compiled into the web application's dll not a separate dll. Therefore the fact you only have a single DLL is correct.

However if you are refering to a 'Web Control Library' then the controls will compile into a dll then can be added to the toolbar and would appear in the references section of solution explorer. In which case you expect more than a single dll in the folder.

 

It might help if you gave a bit more detail about how the folders are structured and which are defined as applications / what permissions are set on each. Also if you have multiple web.config files then these could also affect the ability to correctly debug the site.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
Just to clarify - are you using 'Web User Controls' (the ones with an .ascx extension)? If so these are compiled into the web application's dll not a separate dll. Therefore the fact you only have a single DLL is correct.

 

Ok first of all, I use both of these types of control. The ones with the .ascx extensions are working. This means that, as you said, the compiled controls are in my application DLL. This is not the case for the web control library I guess. I have some control that are only class(.cs). No .ascx extension. Is it normal that these library are not compiled with the rest of the project???

  • Administrators
Posted

If the controls are part of the same project then they should also be compiled into the one Dll. One way to check is to use ildasm.exe (installed along with vs.net etc) and use it to view the web site dll and see if the control classes are defined inside the dll.

 

Have you tried putting the web controls into their own project and adding that project to the solution? that way everything should get rebuilt automatically when you fire up the debugger and it should allow you to set breakpoints within the code as well.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Ok I use ildasm.exe. My DLL contains all the namespace that are supposed to be missing. How come? Why is IIS looking for some other DLL, since every it needs is in the defaut dll.

 

Here's the error line:

 

Parser Error Message: File or assembly name vooral.controls.validation.validators, or one of its dependencies, was not found.

 

<%@ Register TagPrefix="eval" Assembly="vooral.controls.validation.validators" Namespace="vooral.controls.validation.validators" %>

 

The namespace vooral.controls.validation.validators is in vooral.dll. That's the only dll I have.

Posted
Have you tried putting the web controls into their own project and adding that project to the solution? that way everything should get rebuilt automatically when you fire up the debugger and it should allow you to set breakpoints within the code as well.

 

Right, but wont the DLL be put into its own Bin directory? I want all the DLL to be in the same directory, don't I ?

Posted

My website root is in C:\Inetpub\wwwroot\vooral\

 

the bin directory is C:\Inetpub\wwwroot\vooral\bin

 

Here's my solution:

 

solution: solution 'vooral'

projects: vooral, classlibrary (both are part of the solution)

 

When I compile, the vooral project creates the vooral.DLL into the correct directory (C:\Inetpub\wwwroot\vooral\bin). The classlibrary project compile and creates the dll into the C:\Inetpub\wwwroot\vooral\classLibrary\bin\Debug directory. I need to have all the DLL in the same directory, right? Something seems to be wrong here.

 

?

Posted

I can't even create another project in the same solution. Actually I can, but the library I would build in would refer to the namespace: System.Web.UI. It seems like a library project cannot use this namespace. Only web application project can.

 

So I need to create these library within the current project. Basically, those classes are just some validators and a «masterpage container». Those classes dont need any HTML code. So I do not use .ascx files. That's why I use only class(.cs) files.

  • Administrators
Posted

If you create a web control project you should be able to use the System.Web.UI namespace. If not you may just need to set a reference to the system.web.dll and then it should work fine.

Even without a separate project you should be able put a break point in the control's .cs file.

When you build the website do any warnings or errors get generated?

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
If you create a web control project you should be able to use the System.Web.UI namespace. If not you may just need to set a reference to the system.web.dll and then it should work fine.

Even without a separate project you should be able put a break point in the control's .cs file.

When you build the website do any warnings or errors get generated?

 

 

No warning at all.

 

And as I said, all the classes are in the DLL. I checked this with a .exe.

Posted

ok can someone just send me a whole solution with a project in witch a web page (.aspx) imports a assembly that contains a class(.cs). The class could be a validator. No .ascx files. The top of the page would be:

 

<%@ Register TagPrefix="eval" Assembly="myAssembly" Namespace="myAssembly" %>

 

The whole project would work fine without adding any static references in the project. Just hiting the «play» button would do all the job needed.

 

 

This would help me a lot! I've been tearing my hair off for 2 days! :confused:

Posted
It's always working when my web application project is a virtual dictorory(of my default web site). If I want to do the same thing directly in the web root, it doesn't work.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...