473,465 Members | 4,818 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to know if i use ASP.NET or Winforms in a DLL

Hi,

I have one dll that can be called by a Winforms or an Asp.Net
application, and i would like to know how can i find this environment
??

In fact i want to know the SartupDirectory of these application..I
think Server.MapPath is ok for Asp.Net ( WebServices) and
Application.StartupPath for Winforms ?

Aug 16 '06 #1
2 1523
Check if

if (HttpContext.Current != null)
{
// Its a web app [Can be web service or web site]
}

"smoog" <gi************@exane.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Hi,

I have one dll that can be called by a Winforms or an Asp.Net
application, and i would like to know how can i find this environment
??

In fact i want to know the SartupDirectory of these application..I
think Server.MapPath is ok for Asp.Net ( WebServices) and
Application.StartupPath for Winforms ?

Aug 16 '06 #2

Thank u !

Winista a écrit :
Check if

if (HttpContext.Current != null)
{
// Its a web app [Can be web service or web site]
}

"smoog" <gi************@exane.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Hi,

I have one dll that can be called by a Winforms or an Asp.Net
application, and i would like to know how can i find this environment
??

In fact i want to know the SartupDirectory of these application..I
think Server.MapPath is ok for Asp.Net ( WebServices) and
Application.StartupPath for Winforms ?
Aug 17 '06 #3

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

Similar topics

4
by: Elhanan | last post by:
hi.. all a client of ours is considering to move from a dos application to windows desktop application. the application is for traveling agency, the database is rather large. their current...
0
by: Shamil Salakhetdinov | last post by:
Hi All, Have anybody seen somewhere techniques like the one described here: Automating Windows Applications http://www.thecodeproject.com/com/automatingwindowsapps.asp but for managed...
4
by: xenophon | last post by:
I have a class that is used in an ASP.NET app, a WinForms app, and a Win32 Service. What is the best way to tell what environment the code is currently instanced in? Thanks.
2
by: Mahesh Kumar.R | last post by:
I'm into designing an application in winforms but in near future my client may request the same thing in webforms. so (1) what are all the design guidelines and ways are there to migrate easily in...
1
by: Pieter | last post by:
Hi, In my application VB.NET 2005 application I placed a ReportViewer, and link it to a server-report: Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote...
4
by: 3Cooks | last post by:
I have a windows application written in Visual Basic 6.0 that is going to be redeveloped in dotNET. We are trying to decide if we should deploy using Webforms or Winforms and I need advice from...
0
by: netflex | last post by:
Working on a handed off C# project and pretty much my third time dipping into C#. In my solution file, I have a collection of .resx files in their own folder, several .cs files, and my winforms .cs...
5
by: brian.wilson4 | last post by:
Our group is currently comparing winforms vs webforms.....app is Corp LAN based - we have control of desktops.....Below is pros and cons list we have come up with - if anything strikes you as...
23
by: raylopez99 | last post by:
Here I am learning WinForms and two months into it I learn there's a WPF API that is coming out. Is this WPF out yet, and is it a threat to WinForms, in the sense that all the library routines I...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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
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 ...

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.