473,487 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Where should the client side control live in ASP.NET app fiolder?

I developed a client side control using Windows Forms and I want to deploy it
through IE inside an ASP.NET project.

I am using the object tag to deploy:

<OBJECT id="SSFileCtrl1" classid="SSCtrl.dll#SSCtrl.SSFileCtrl" VIEWASTEXT>
</OBJECT>

The previous code only works if SSCtrl.dll is inside the application root of
ASP.NET project. It doesn't work if the file is inside the "bin" folder,
which I assume it should work fine!!?

I tried the following classid="bin/SSCtrl.dll#SSCtrl.SSFileCtrl" and it
didn't work too.

Is there a way to make this work if the control is inside the bin folder?

Thanks for any help,

Nov 18 '05 #1
7 1467
look at the codebase attribute

-- bruce (sqlwork.com)

"Hani Atassi" <ha**@community.nospam> wrote in message
news:CD**********************************@microsof t.com...
I developed a client side control using Windows Forms and I want to deploy it through IE inside an ASP.NET project.

I am using the object tag to deploy:

<OBJECT id="SSFileCtrl1" classid="SSCtrl.dll#SSCtrl.SSFileCtrl" VIEWASTEXT> </OBJECT>

The previous code only works if SSCtrl.dll is inside the application root of ASP.NET project. It doesn't work if the file is inside the "bin" folder,
which I assume it should work fine!!?

I tried the following classid="bin/SSCtrl.dll#SSCtrl.SSFileCtrl" and it
didn't work too.

Is there a way to make this work if the control is inside the bin folder?

Thanks for any help,

Nov 18 '05 #2
Hi Hani,

Thanks for your posting. As for the problem you mentioned, based on my
test, if the web page that used the winform control is also in the web
app's root folder, it can find the assembly correctly if we assign the path
as
classid="bin/Assembly.dll#Namespace.Class"

So are your web pages also in the web app's root folder or is some other
folder hierarchy in the web app?
Also, I suggest you try using the dynamic generated path in your page such
as:

<OBJECT id="wlbl" classid='<%= ResolveUrl("~/bin/")
%>WindowsControlLib.dll#WindowsControlLib.WLabel' VIEWASTEXT></OBJECT>

#ResolveUrl("~/bin/") will return the path of the "bin" sub folder under
the application's root folder

Hope helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #3
Hi Steven,

Thanks for your input..

I liked the ResolveUrl solution, but it didn't work until I set the "Read"
permission on the bin folder. I thought the search pattern for IIS in case of
DLLs is to search the bin folder incase it didn't find the file in the page
folder (which was in my case also in the root).

I don't like setting Read on bin because I understand that "bin" should be
hidden from the outside world, but in this case we could allow people to
download file from the bin folder.

Any comments?

"Steven Cheng[MSFT]" wrote:
Hi Hani,

Thanks for your posting. As for the problem you mentioned, based on my
test, if the web page that used the winform control is also in the web
app's root folder, it can find the assembly correctly if we assign the path
as
classid="bin/Assembly.dll#Namespace.Class"

So are your web pages also in the web app's root folder or is some other
folder hierarchy in the web app?
Also, I suggest you try using the dynamic generated path in your page such
as:

<OBJECT id="wlbl" classid='<%= ResolveUrl("~/bin/")
%>WindowsControlLib.dll#WindowsControlLib.WLabel' VIEWASTEXT></OBJECT>

#ResolveUrl("~/bin/") will return the path of the "bin" sub folder under
the application's root folder

Hope helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #4
Thanks bruce for your reply.
codebase is used with the case of ActiveX not .NET User Controls.

"bruce barker" wrote:
look at the codebase attribute

-- bruce (sqlwork.com)

"Hani Atassi" <ha**@community.nospam> wrote in message
news:CD**********************************@microsof t.com...
I developed a client side control using Windows Forms and I want to deploy

it
through IE inside an ASP.NET project.

I am using the object tag to deploy:

<OBJECT id="SSFileCtrl1" classid="SSCtrl.dll#SSCtrl.SSFileCtrl"

VIEWASTEXT>
</OBJECT>

The previous code only works if SSCtrl.dll is inside the application root

of
ASP.NET project. It doesn't work if the file is inside the "bin" folder,
which I assume it should work fine!!?

I tried the following classid="bin/SSCtrl.dll#SSCtrl.SSFileCtrl" and it
didn't work too.

Is there a way to make this work if the control is inside the bin folder?

Thanks for any help,


Nov 18 '05 #5
Hi Hani,

Thanks for your followup. As for the "bin" folder you mentioned, yes,
generally it is only used internally by ASP.NET and the all the assemblies
used by the asp.net's serverside code will be located in the private bin
path(in addtion to GAC). However, as for IE host winform control, it is
not refernced by serverside code(assembly), but be required by the
clientside(IE). In other words, the assembly is something like a serverside
static resources that the client need to download it. Thus, the "Read"
permission is required. Also, since the IE host winform control's assembly
has no related to the serverside assemlbies in the "bin" folder, I
recommedn that we create another separate folder to store them. For
example, provide a "clientbin" private folder to store all those assemblies
and allow "read" in IIS for that folder.

If you have anything unclear, please feel free to post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #6
I agree with you Steven.. Actually, setting the read permission on the "bin"
folder will get overridden by IIS and removed next time you compile and run
the ASP.NET application.

Thanks for your detailed explanation.

"Steven Cheng[MSFT]" wrote:
Hi Hani,

Thanks for your followup. As for the "bin" folder you mentioned, yes,
generally it is only used internally by ASP.NET and the all the assemblies
used by the asp.net's serverside code will be located in the private bin
path(in addtion to GAC). However, as for IE host winform control, it is
not refernced by serverside code(assembly), but be required by the
clientside(IE). In other words, the assembly is something like a serverside
static resources that the client need to download it. Thus, the "Read"
permission is required. Also, since the IE host winform control's assembly
has no related to the serverside assemlbies in the "bin" folder, I
recommedn that we create another separate folder to store them. For
example, provide a "clientbin" private folder to store all those assemblies
and allow "read" in IIS for that folder.

If you have anything unclear, please feel free to post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #7
You're welcome , Hani,

Thanks again for your posting. Have a good day!
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7945
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script :...
2
2268
by: Stephanie Stowe | last post by:
Hi. I have never worked on a project that requires IE. So I have done the vast majority of my work server side, delivering cross-browser compliant HTML to the client. I am working on a bug fix to a...
3
469
by: Ken Allen | last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other languages and done some COM work for a number of years. I am attempting to understand how to map an older program...
3
6912
by: Borr | last post by:
Hi, I have an ASP .NET page, that runs client side timer that does something on the Server side and after that loads another page. So I have on client side something like : function...
4
4622
by: bogdan | last post by:
Hi, I have two listboxes on a page and need to move items between them - using buttons (e.g. "<<" ">>"). Can this be done on a client side in asp.net? I'd like to avoid hitting the server on...
2
1107
by: Jordan S. | last post by:
I'm experimenting with dynamically inserting custom composite Web server controls onto a page. For testing purposes I have two custom composite Web server controls that each have a couple of...
7
1086
by: GiJeet | last post by:
I would like to use linq on the client to navigate the DOM rather then jquery or javascript. Is this possible. Is linq only server side? J
7
1765
by: yanni | last post by:
I have some thing like this: <body> <form id="form1" runat="server"> <div> <asp:DropDownList ID="uxTestDropDownList" runat="server" /> <asp:Button ID="uxSubmitButton" runat="server"...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.