Showing posts with label dll. Show all posts
Showing posts with label dll. Show all posts

Monday, March 26, 2012

newbie and the /bin dir

Hi,

For a new ASP.Net application, I've read that it's dll's need to be stored
in the /bin dir which is created under the wwwroot/ directory.

I've also read that you can store dll's in a /bin dir under the application
itself e.g. wwwroot/myapp/bin.

I'm just trying to get to grips with the above...
- is the root /bin dir for dll's that are accessed by different web
applications?
- is the application /bin dir for dll's that are only accessed by the
application itself?

We have a few ASP apps on an ISP and are looking to xfer these to .Net. Is
is better to put our app dll's in the app /bin directory or risk class
compatibility problems by putting them in root/bin? Are there any security
problems or loss of performance putting them in an app dll?

Thanks for any advice given.

Best regards

Bob"Bob H" <bh15@.le.ac.uk> wrote in message
news:btbf8c$bin$1@.south.jnrs.ja.net...
> Hi,
> For a new ASP.Net application, I've read that it's dll's need to be stored
> in the /bin dir which is created under the wwwroot/ directory.
> I've also read that you can store dll's in a /bin dir under the
application
> itself e.g. wwwroot/myapp/bin.
> I'm just trying to get to grips with the above...
> - is the root /bin dir for dll's that are accessed by different web
> applications?
> - is the application /bin dir for dll's that are only accessed by the
> application itself?
> We have a few ASP apps on an ISP and are looking to xfer these to .Net. Is
> is better to put our app dll's in the app /bin directory or risk class
> compatibility problems by putting them in root/bin? Are there any security
> problems or loss of performance putting them in an app dll?
> Thanks for any advice given.
> Best regards
> Bob

When you use Visual Studio to build your ASP.Net application, that will
compile
your application into dll's and place them in your application-bin
directory.

Using Visual Studio, you need to "reference" your COM-dll's. Those com-dll's
need to be registered as usual. A .Net interface is automatically generated.

Hans Kesting
Hi bob,

to understand this, you need to understand a bit about IIS web applications,
and how they are configured, in particular, ASP.Net applications.

In IIS, a web application is configured in the metabase. A web application
is a distinct memory space which is used by all server-side entities
belonging to a web application. A web application is defined by a set of
folders and files that reside under the "root" folder of the application. If
a sub-folder of an application root folder is configured as a web
application, it has its own separate memory space for all folders underneath
it. Therefore, you can have nested web applications, one inside another
physically (in the folder structure) but having a completely separate memory
space.

In ASP.Net, there are certain special files and folders which relate to the
web application. One of these is the bin folder. The bin folder must reside
directly underneath the application root folder. This is how ASP.Net apps
find the DLLs that you store there. You can tweak the location of these DLLs
in the configuration files if you need to, but usually you don't, and you
should store your DLLs in the bin folder directly under the root. In
addition, the web.config and global.asax files for each application must
reside in the root folder of that application.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Bob H" <bh15@.le.ac.uk> wrote in message
news:btbf8c$bin$1@.south.jnrs.ja.net...
> Hi,
> For a new ASP.Net application, I've read that it's dll's need to be stored
> in the /bin dir which is created under the wwwroot/ directory.
> I've also read that you can store dll's in a /bin dir under the
application
> itself e.g. wwwroot/myapp/bin.
> I'm just trying to get to grips with the above...
> - is the root /bin dir for dll's that are accessed by different web
> applications?
> - is the application /bin dir for dll's that are only accessed by the
> application itself?
> We have a few ASP apps on an ISP and are looking to xfer these to .Net. Is
> is better to put our app dll's in the app /bin directory or risk class
> compatibility problems by putting them in root/bin? Are there any security
> problems or loss of performance putting them in an app dll?
> Thanks for any advice given.
> Best regards
> Bob
Hi,
I'm also a newbie in ASP.NET. I'm wondering if the bin dir for the dll
is neccessary or if there is a possibility to store the dll of the web
application at an other place. E.g. in the application root.

Can anyone please tell me whether this is possible and if not why not.
Perhaps someone of you also know a link to the specification of
ASP.NET where that things a described.

Thanks In Advance

Markus Heid

"Kevin Spencer" <kevin@.takempis.com> wrote in message news:<eV27qn60DHA.4032@.tk2msftngp13.phx.gbl>...
> Hi bob,
> to understand this, you need to understand a bit about IIS web applications,
> and how they are configured, in particular, ASP.Net applications.
> In IIS, a web application is configured in the metabase. A web application
> is a distinct memory space which is used by all server-side entities
> belonging to a web application. A web application is defined by a set of
> folders and files that reside under the "root" folder of the application. If
> a sub-folder of an application root folder is configured as a web
> application, it has its own separate memory space for all folders underneath
> it. Therefore, you can have nested web applications, one inside another
> physically (in the folder structure) but having a completely separate memory
> space.
> In ASP.Net, there are certain special files and folders which relate to the
> web application. One of these is the bin folder. The bin folder must reside
> directly underneath the application root folder. This is how ASP.Net apps
> find the DLLs that you store there. You can tweak the location of these DLLs
> in the configuration files if you need to, but usually you don't, and you
> should store your DLLs in the bin folder directly under the root. In
> addition, the web.config and global.asax files for each application must
> reside in the root folder of that application.
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.

Saturday, March 24, 2012

Newbie Embedded WUC DLL Question

Hello -
I've been racking my brains trying to figure out what's going on with
my embedded .NET 2.0 windows user control.
I've developed a Windows Forms application using Visual C# 2005
Express. I'm interested in migrating it to the web as an embedded
windows user control.
As a proof of concept, I've been playing around embedding some very
basic Windows user controls into both HTML and ASP pages using Visual
Web Developer 2005 Express. (My web development is very limited).
I've done some searching and found examples of how to embed a user
control as an object by inserting something like the following
(<OBJECT id="myObject" classid="myDll.dll#myNamespace.myControl"
height=480 width=480></OBJECT> ) into HTML code and copying the DLL
file in the 'root' (not /bin) directory of the page.
Now here's where the fun comes in...
I'm testing some very basic embedded controls using Microsoft's
ASP.NET Development server and I'm getting some very odd and
unexplained behavior.
1) When I create a new website project and insert the control, most of
the time (but not always) my sample control will display in the
internal browser inside the Visual Web Developer IDE and it will
display in IE (as launched from the Visual Web Developer IDE in debug
mode)
2) If I change the embedded user control code (inside Visual C#
Express) and recompile and re-copy the DLL file into the web project
directory, I very rarely see the updates reflected in the user
control. It seems to be using a cached version of the DLL'
3) Eventually, I will reach a state where the user control no longer
even appears in the web browser window when trying to run the site
(using the Development Server). It only shows up as an object icon
place holder.
I've tried all sorts of things like:
1) Stopping the development server before copying the new DLL file
into the web project
2) Restarting Visual Web Developer Express
3) Deleting all the temporary IE files
4) Deleting all the files from C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\
None of those attempts seems to change what I'm observing - why only
sometimes the embedded control displays and why none of the re-
compiles/re-copying of the DLL files seem to 'take effect'. Also,
once the control stops displaying, I essentially have to create an
entirely new web project to see the control again.
Any thoughts/links to examples or suggestions would be greatly
appreciated.
Thanks,
Mike D.the control is cached in two places
1) ie caches the dll in its temp area (use delete temp files in ie).
2) the gac caches the jit'd code. use gacutil /cdl
note: this is probably a dead-end approach. you should look at
Silverlight as a more long term solution.
-- bruce (sqlwork.com)
mdemase@.gmail.com wrote:
> Hello -
> I've been racking my brains trying to figure out what's going on with
> my embedded .NET 2.0 windows user control.
> I've developed a Windows Forms application using Visual C# 2005
> Express. I'm interested in migrating it to the web as an embedded
> windows user control.
> As a proof of concept, I've been playing around embedding some very
> basic Windows user controls into both HTML and ASP pages using Visual
> Web Developer 2005 Express. (My web development is very limited).
> I've done some searching and found examples of how to embed a user
> control as an object by inserting something like the following
> (<OBJECT id="myObject" classid="myDll.dll#myNamespace.myControl"
> height=480 width=480></OBJECT> ) into HTML code and copying the DLL
> file in the 'root' (not /bin) directory of the page.
> Now here's where the fun comes in...
> I'm testing some very basic embedded controls using Microsoft's
> ASP.NET Development server and I'm getting some very odd and
> unexplained behavior.
> 1) When I create a new website project and insert the control, most of
> the time (but not always) my sample control will display in the
> internal browser inside the Visual Web Developer IDE and it will
> display in IE (as launched from the Visual Web Developer IDE in debug
> mode)
> 2) If I change the embedded user control code (inside Visual C#
> Express) and recompile and re-copy the DLL file into the web project
> directory, I very rarely see the updates reflected in the user
> control. It seems to be using a cached version of the DLL'
> 3) Eventually, I will reach a state where the user control no longer
> even appears in the web browser window when trying to run the site
> (using the Development Server). It only shows up as an object icon
> place holder.
> I've tried all sorts of things like:
> 1) Stopping the development server before copying the new DLL file
> into the web project
> 2) Restarting Visual Web Developer Express
> 3) Deleting all the temporary IE files
> 4) Deleting all the files from C:\WINDOWS\Microsoft.NET\Framework
> \v2.0.50727\Temporary ASP.NET Files\
> None of those attempts seems to change what I'm observing - why only
> sometimes the embedded control displays and why none of the re-
> compiles/re-copying of the DLL files seem to 'take effect'. Also,
> once the control stops displaying, I essentially have to create an
> entirely new web project to see the control again.
> Any thoughts/links to examples or suggestions would be greatly
> appreciated.
> Thanks,
> Mike D.
>

Newbie Embedded WUC DLL Question

Hello -

I've been racking my brains trying to figure out what's going on with
my embedded .NET 2.0 windows user control.

I've developed a Windows Forms application using Visual C# 2005
Express. I'm interested in migrating it to the web as an embedded
windows user control.

As a proof of concept, I've been playing around embedding some very
basic Windows user controls into both HTML and ASP pages using Visual
Web Developer 2005 Express. (My web development is very limited).
I've done some searching and found examples of how to embed a user
control as an object by inserting something like the following
(<OBJECT id="myObject" classid="myDll.dll#myNamespace.myControl"
height=480 width=480></OBJECT>) into HTML code and copying the DLL
file in the 'root' (not /bin) directory of the page.

Now here's where the fun comes in...

I'm testing some very basic embedded controls using Microsoft's
ASP.NET Development server and I'm getting some very odd and
unexplained behavior.

1) When I create a new website project and insert the control, most of
the time (but not always) my sample control will display in the
internal browser inside the Visual Web Developer IDE and it will
display in IE (as launched from the Visual Web Developer IDE in debug
mode)

2) If I change the embedded user control code (inside Visual C#
Express) and recompile and re-copy the DLL file into the web project
directory, I very rarely see the updates reflected in the user
control. It seems to be using a cached version of the DLL??

3) Eventually, I will reach a state where the user control no longer
even appears in the web browser window when trying to run the site
(using the Development Server). It only shows up as an object icon
place holder.

I've tried all sorts of things like:
1) Stopping the development server before copying the new DLL file
into the web project
2) Restarting Visual Web Developer Express
3) Deleting all the temporary IE files
4) Deleting all the files from C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\

None of those attempts seems to change what I'm observing - why only
sometimes the embedded control displays and why none of the re-
compiles/re-copying of the DLL files seem to 'take effect'. Also,
once the control stops displaying, I essentially have to create an
entirely new web project to see the control again.

Any thoughts/links to examples or suggestions would be greatly
appreciated.

Thanks,
Mike D.the control is cached in two places

1) ie caches the dll in its temp area (use delete temp files in ie).
2) the gac caches the jit'd code. use gacutil /cdl

note: this is probably a dead-end approach. you should look at
Silverlight as a more long term solution.

-- bruce (sqlwork.com)

mdemase@.gmail.com wrote:

Quote:

Originally Posted by

Hello -
>
I've been racking my brains trying to figure out what's going on with
my embedded .NET 2.0 windows user control.
>
I've developed a Windows Forms application using Visual C# 2005
Express. I'm interested in migrating it to the web as an embedded
windows user control.
>
As a proof of concept, I've been playing around embedding some very
basic Windows user controls into both HTML and ASP pages using Visual
Web Developer 2005 Express. (My web development is very limited).
I've done some searching and found examples of how to embed a user
control as an object by inserting something like the following
(<OBJECT id="myObject" classid="myDll.dll#myNamespace.myControl"
height=480 width=480></OBJECT>) into HTML code and copying the DLL
file in the 'root' (not /bin) directory of the page.
>
Now here's where the fun comes in...
>
I'm testing some very basic embedded controls using Microsoft's
ASP.NET Development server and I'm getting some very odd and
unexplained behavior.
>
1) When I create a new website project and insert the control, most of
the time (but not always) my sample control will display in the
internal browser inside the Visual Web Developer IDE and it will
display in IE (as launched from the Visual Web Developer IDE in debug
mode)
>
2) If I change the embedded user control code (inside Visual C#
Express) and recompile and re-copy the DLL file into the web project
directory, I very rarely see the updates reflected in the user
control. It seems to be using a cached version of the DLL??
>
3) Eventually, I will reach a state where the user control no longer
even appears in the web browser window when trying to run the site
(using the Development Server). It only shows up as an object icon
place holder.
>
I've tried all sorts of things like:
1) Stopping the development server before copying the new DLL file
into the web project
2) Restarting Visual Web Developer Express
3) Deleting all the temporary IE files
4) Deleting all the files from C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\
>
None of those attempts seems to change what I'm observing - why only
sometimes the embedded control displays and why none of the re-
compiles/re-copying of the DLL files seem to 'take effect'. Also,
once the control stops displaying, I essentially have to create an
entirely new web project to see the control again.
>
Any thoughts/links to examples or suggestions would be greatly
appreciated.
>
Thanks,
Mike D.
>

Friday, March 16, 2012

newbie on asp.net 2.0

Is there a way to have back a way to compile all the code on a website and
just send DLL's to the final webserver instead of all the code?
VictorYes, but I don't know how myself yet. Try this...
search term: compilation site:msdn2.microsoft.com
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
<lasalsatx@.newsgroups.nospam> wrote in message
news:eCqKISLBGHA.1028@.TK2MSFTNGP11.phx.gbl...
> Is there a way to have back a way to compile all the code on a website and
> just send DLL's to the final webserver instead of all the code?
> Victor
>
look at the vs2005 publish step. if you are using notepad instead, look at
the aspnet_compiler switches.
-- bruce (sqlwork.com)
<lasalsatx@.newsgroups.nospam> wrote in message
news:eCqKISLBGHA.1028@.TK2MSFTNGP11.phx.gbl...
> Is there a way to have back a way to compile all the code on a website and
> just send DLL's to the final webserver instead of all the code?
> Victor
>
lasalsatx@.newsgroups.nospam wrote:
> Is there a way to have back a way to compile all the code on a
> website and just send DLL's to the final webserver instead of all the
> code?
> Victor
You can use the Publish feature in VS 2005. If you want more control over
the process, you can use the Web Deployment Projects add-in to VS 2005:
http://msdn.microsoft.com/asp.net/r...dp/default.aspx
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
Merry Christmas from JIMCO Software!

newbie obfuscating issue

I'm trying to do my first obfuscation because I want to distribute an ascx
control along with an obfuscated dll. I'm using the obfuscator that comes
with vs.net and registered the community edition and went to the Yahoo forum
and found that there have been no messages since May. I guess this means
there is no support for the community edition?

When I used my dll as input for obfuscation I got the following messages:

Dotfuscator Community Edition cannot rename generic types or methods. If you
would like Dotfuscator to rename generics, please try Standard or
Professional Edition. See www.preemptive.com for more details.

Community Edition cannot rename generic method Create__Instance__ [!!0(!!0)]
in class GTUdll.My.MyProject/MyWebServices.

Community Edition cannot rename generic method Dispose__Instance__
[void(!!0&)] in class GTUdll.My.MyProject/MyWebServices.

Community Edition cannot rename generic class
GTUdll.My.MyProject/ThreadSafeObjectProvider`1.

The obfuscated dll won't work in the project because the method names have
been changed.

Is it possible to obfuscate a dll and distribute it with an ascx control
that calls the methods in the dll?

Regards,

TI replied to another post of your's.. Please give a try with RemoteSoft
..net obfuscator.
You can get it here
http://remotesoft.com/eval_download..._Evaluation.msi
"Tina" <TinaMSeaburn@.nospamexcite.comwrote in message
news:%23L0FS50uGHA.560@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

I'm trying to do my first obfuscation because I want to distribute an ascx
control along with an obfuscated dll. I'm using the obfuscator that comes
with vs.net and registered the community edition and went to the Yahoo
forum and found that there have been no messages since May. I guess this
means there is no support for the community edition?
>
>
>
When I used my dll as input for obfuscation I got the following messages:
>
>
>
Dotfuscator Community Edition cannot rename generic types or methods. If
you would like Dotfuscator to rename generics, please try Standard or
Professional Edition. See www.preemptive.com for more details.
>
>
>
Community Edition cannot rename generic method Create__Instance__
[!!0(!!0)] in class GTUdll.My.MyProject/MyWebServices.
>
Community Edition cannot rename generic method Dispose__Instance__
[void(!!0&)] in class GTUdll.My.MyProject/MyWebServices.
>
Community Edition cannot rename generic class
GTUdll.My.MyProject/ThreadSafeObjectProvider`1.
>
>
>
The obfuscated dll won't work in the project because the method names have
been changed.
>
>
>
Is it possible to obfuscate a dll and distribute it with an ascx control
that calls the methods in the dll?
>
>
>
Regards,
>
T
>
>
>
>