RE: Windows User Control wont load in IE browser!



Hi again,

as nobody replied I continued digging and found this article on the subject:

http://aspnet.4guysfromrolla.com/articles/052604-1.aspx

In here I found the problem, my execute permissions were "Script and
Execute" while its should be "Script Only". For some reason having Execute on
will cause the secnario I mentioned above, as soon as I switched to "Script
Only".

I hope this helps somebody out in the future.

Regards,
Claudio

"Claudio Maras" wrote:

Hi,

new to this newsgroup so please bare with me if Im a bit off here.

I have created a Windows User Control in Visual Studio 2005 (.NET 2.0) that
I load through a Web Form using the OBJECT tag.

During development I used the "ASP.NET Development Server" and in here I
have got the user control to load and execute. The following is what the User
Control does:

- Contact a Web Service and recieves a DataSet.
- Verifies the file structure the User Control uses.
- Creates a Tab Delimited file with teh data from the DataSet.
- Opens Word and use Mail Merge to merge the Tab Delimited file.
- Prints the Word Document to the default ptinter.

To get this working on the "ASP.NET Development Server" I had to:
- Strong Name my assembly.
- Add the System.Security.Permissions to complete the File IO and other tasks.

But to be honest the last is only applicable if the User Control loads!

So once I have now completed my User Control I published the Web Application
to a folder and created a Virtual Directory in IIS 6.0. The problem arrives
when I load my page wpcPrintMan.aspx, the OBJECT frame where the User Control
should load stays blank.

If I look under "C:\WINDOWS\Assembly\Download" there is nothing there, FYI
before I published my site I ran the command "GACUTIL -CDL" to clear the
download cache. Also I run the Web Page wpcPrintMan.aspx from the same
machine where IIS is installed, this is also the same machine the User
control loaded just fine using the "ASP.NET Developmet Server".

There must be something on the IIS that is different as that is the only
thing that is different between the tests. But I have gone over eveything I
know, I have a infrastructure background so I've setup and managed a couple
of IIS over the years but Im not that at home with .NET Framework security
which I believe is the issue that the User Control does not load.

So if anybody knows why my User Control refuses to load or what logs I can
check to see what is going on. I did check the Sites log file which shows
that the IIS does a GET on both the wpc.PrintMan.aspx and the PrintMan.dll.

Regards,
Claudio
.



Relevant Pages

  • Re: page.init vs page.load
    ... The problem I'm having is that this is in a user control that I'm doing the ... the page load, then everything in the page load for the user control. ... > problems loading your page then I would keep all your stuff in Page_Load. ... >> the page loads for the first time. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Placeholder child of child control event problem.
    ... What you are saying is you have a user control in a page and when you ... One thing you could is load both the user controls on page load (which ... > I have problem with placeholder which contain web user control. ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: User Control an ID
    ... Public Property Parameteras string ... > load i with loadcontral load dynamic some user control. ... But now in test.ascx is loaded twice so how can i now ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: loading usercontrol (ascx) more than once into placeholder impossible?
    ... You should be able to load and add as many instances of the same UC as you ... Can you show some code to repro this? ... My blog: http://clariusconsulting.net/vga ... > Check the id for your User Control in the designer. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: asp.net user control
    ... I suggest you put breakpoints in your user contol and in your aspx page to get an idea of the order in which events are occurring. ... it is unclear whether your code is supposed to execute javascript or c#/vb code. ... On every page we have include asp that have some common asp code that I ... need to run before the page code kicks in, but user control code is ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast