472,359 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,359 software developers and data experts.

Howto: WebService in not Bin folder?

Hello.
I have simple web folders structure:
-ROOT
- BIN
WebService.dll
WebService.asmx

I need to use my WebService.dll not in bin folder - for example, in ROOT.
How do i this?
How can i do this without .config file only with some configuration
object/class? I need this for prevent access locally to text file - i want
to do this only in binary! How is it possible?
Where can i get information about this with examples?

Thank you.
Nov 23 '05 #1
8 3970
It's not clear to me what you are trying to do. Where is this text file
you want to not allow access to? How will moving the DLL change this?

The path to the DLL (the web service implementation) is referenced in the
asmx file. Simply change it to suit.

I hope this helps ... even if It's not clear to me what the issue is.

Regards

Dan Rogers
Microsoft Corporation
--------------------
Reply-To: "Topper" <al****************@bix.ru>
From: "Topper" <al****************@bix.ru>
Subject: Howto: WebService in not Bin folder?
Date: Tue, 14 Dec 2004 16:33:55 +0300
Lines: 17
Organization: BIX
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <#$**************@TK2MSFTNGP15.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftn gxa06.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP15.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8069
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hello.
I have simple web folders structure:
-ROOT
- BIN
WebService.dll
WebService.asmx

I need to use my WebService.dll not in bin folder - for example, in ROOT.
How do i this?
How can i do this without .config file only with some configuration
object/class? I need this for prevent access locally to text file - i want
to do this only in binary! How is it possible?
Where can i get information about this with examples?

Thank you.

Nov 23 '05 #2
ASMX file has definition(assembly name) of my WebService object for
ASP.NET.
ASP.NET searching my WebService assembly in bin folder (by default it
defined in machine.config file)

But if i place my WebService dll not in bin folder ASP.NET cann't found it
and error occured.
MSDN describe how can i configure my WebService for new place (not bin
folder, for example) - using tags <codebase>, ... etc. - but in my case it
doesn't work absolutly (i'm trying to understood why)
This configurations placed in web.config file in the same folder as my Web
application - this text file i want to prevent for local use.
My question is: can i configure my WebService without using web.config -
only using object/class model?
And where can i get examples?

Thank You.

"Dan Rogers" <da***@microsoft.com> wrote in message
news:fI**************@cpmsftngxa10.phx.gbl...
It's not clear to me what you are trying to do. Where is this text file
you want to not allow access to? How will moving the DLL change this?

The path to the DLL (the web service implementation) is referenced in the
asmx file. Simply change it to suit.

I hope this helps ... even if It's not clear to me what the issue is.

Regards

Dan Rogers
Microsoft Corporation
--------------------
Reply-To: "Topper" <al****************@bix.ru>
From: "Topper" <al****************@bix.ru>
Subject: Howto: WebService in not Bin folder?
Date: Tue, 14 Dec 2004 16:33:55 +0300
Lines: 17
Organization: BIX
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <#$**************@TK2MSFTNGP15.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftn gxa06.phx.gbl!TK2MSFTNGP08 phx.gbl!TK2MSFTNGP15.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8069
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hello.
I have simple web folders structure:
-ROOT
- BIN
WebService.dll
WebService.asmx

I need to use my WebService.dll not in bin folder - for example, in ROOT.
How do i this?
How can i do this without .config file only with some configuration
object/class? I need this for prevent access locally to text file - i want
to do this only in binary! How is it possible?
Where can i get information about this with examples?

Thank you.

Nov 23 '05 #3
Hi Topper:
ASMX file has definition(assembly name) of my WebService object for
ASP.NET.
ASP.NET searching my WebService assembly in bin folder (by default it
defined in machine.config file)
But if i place my WebService dll not in bin folder ASP.NET cann't found it
and error occured.


If you use Visual Studio .NET, it breaks your web service into two parts, a
..ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
CODEBEHIND attribute in the .ASMX file. Now when you compile your project,
the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file
(reference in the URL), it sees the INHERITS attribute and compiles a
temporary class by inheriting the codebehind class from the DLL. So, /BIN is
just the default probing path to lookup assemblies. And since you don't want
to configure alternative probing paths in web.config, you problem can be
solved by not using a codebehind at all. Put all your code in .ASMX and be
done with!

Mujtaba.
Nov 23 '05 #4
I'm trying to use webservice business logic only in binary file (dll ) and
asmx-file using for it is not good idea.
"Mujtaba Syed" <mu*****@marlabs.com> wrote in message
news:OC*************@TK2MSFTNGP11.phx.gbl...
Hi Topper:
ASMX file has definition(assembly name) of my WebService object for
ASP.NET.
ASP.NET searching my WebService assembly in bin folder (by default it
defined in machine.config file)
But if i place my WebService dll not in bin folder ASP.NET cann't found it and error occured.
If you use Visual Studio .NET, it breaks your web service into two parts,

a .ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
CODEBEHIND attribute in the .ASMX file. Now when you compile your project,
the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file
(reference in the URL), it sees the INHERITS attribute and compiles a
temporary class by inheriting the codebehind class from the DLL. So, /BIN is just the default probing path to lookup assemblies. And since you don't want to configure alternative probing paths in web.config, you problem can be
solved by not using a codebehind at all. Put all your code in .ASMX and be
done with!

Mujtaba.

Nov 23 '05 #5
Hi Alexander,

Could you be clearer about what the problem is? Why is the Bin directory
something you don't like? And what text file is it that you think there is
an issue for? What is that issue?

Dan
--------------------
Reply-To: "Topper" <al****************@bix.ru>
From: "Topper" <al****************@bix.ru>
References: <#$**************@TK2MSFTNGP15.phx.gbl>
<fI**************@cpmsftngxa10.phx.gbl>
<e4**************@TK2MSFTNGP09.phx.gbl>
<OC*************@TK2MSFTNGP11.phx.gbl>
Subject: Re: Howto: WebService in not Bin folder?
Date: Thu, 16 Dec 2004 11:03:26 +0300
Lines: 36
Organization: BIX
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ep**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8126
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I'm trying to use webservice business logic only in binary file (dll ) and
asmx-file using for it is not good idea.
"Mujtaba Syed" <mu*****@marlabs.com> wrote in message
news:OC*************@TK2MSFTNGP11.phx.gbl...
Hi Topper:
ASMX file has definition(assembly name) of my WebService object for
ASP.NET.
ASP.NET searching my WebService assembly in bin folder (by default it
defined in machine.config file)
But if i place my WebService dll not in bin folder ASP.NET cann't found it and error occured.
If you use Visual Studio .NET, it breaks your web service into two parts,

a .ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
CODEBEHIND attribute in the .ASMX file. Now when you compile your project,
the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file
(reference in the URL), it sees the INHERITS attribute and compiles a
temporary class by inheriting the codebehind class from the DLL. So, /BIN is just the default probing path to lookup assemblies. And since you don't want to configure alternative probing paths in web.config, you problem can be
solved by not using a codebehind at all. Put all your code in .ASMX and be
done with!

Mujtaba.


Nov 23 '05 #6
Ok.
I've develop project for PDA terminals. There're two components - server
(PC) and PDA-client(s).
My project is a part of another commertial solution and used as
internet/intranet solution. But it is not Internet application.

The one of common goals of my project sounds like this:
(!)Server part must be as a black box ("pandora box") - it must be prevent
for any changes and customisations 'cause
it planned to use as a commertial platform for another terminal clients
development(!).

Compact framework supports only two ways for data exchange between client
and server (as i know) - one is Messaging (using SOAP/XML messages exchange
over HTTP or TCP). The second is webservices. I've choose second 'cause it
is a simply to use, development, flexible and simply for any enhancements.
The first one is hardly scalable and flexible because i must to declare any
SOAP/XML request and response (messages) for client and server.

I'd choose WebService technology for my solution.
But i have one problem - i must not use IIS server (it concerned with
services of another solution parts - i cann't change its logic) .
And i've develop my own web server for hosting own WebServices (i've seen
Cassini Web server sample).

And now i have two problems that i want to solve:
1.My WebService and Web Server use the same assemblies (for example,
core.dll, common.dll etc.) and i have to place its to BIN folder(for
websercvices) and ROOT (for webServer and HTTP handler like asmx-file ) - it
is not good idea, imho.
2. Because this solution is for commertial use, i need to prevent it for any
cases of customisations( hacking, unlicense usage, etc.). The common way is
to prevent any customisations in asmx-files because these files is TEXT
files and its use inside description of codebehind assemblies. Some"bad man"
(hacker, employee, etc.) can write own webservice as mine and path it in
asmx-file instead mine assemply. In this case he takes access to any
information that PDA exchanges to Server - it can be security info like
credit cards info or some private information.

To solving these problems i found in MSDN that i can configure my web
service using .config file.
For one i must use <codebase> or <probing> tags in my .config file.
For second i must create my own IHTTPHandler-class instead asmx-file and
describe it as handler in .config file using <<httpHandlers> tag.
But .config file is also TEXT file and it can be customised by somebody also
(like asmx file) =((

And i have two questions:
1. How can i configure my ASP.NET applications without .config file - only
using some class or object? Maybe i may to secure .config file or place it
into some dll-resources?
2. How can i change default place for my WebServices (BIN-folder)? (It is
not primary goal but i'd describe above why i don't want to divide
WebServer, HTTP-handlers and WebServices dll-files to different folders)

And how can i secure my ASP.NET solution for any LOCAL customisations (any
text file like .config and asmx files)?

May anybody answer me how?

Alexander.
"Dan Rogers" <da***@microsoft.com> wrote in message
news:va**************@cpmsftngxa10.phx.gbl...
Hi Alexander,

Could you be clearer about what the problem is? Why is the Bin directory
something you don't like? And what text file is it that you think there is an issue for? What is that issue?

Dan
--------------------
Reply-To: "Topper" <al****************@bix.ru>
From: "Topper" <al****************@bix.ru>
References: <#$**************@TK2MSFTNGP15.phx.gbl>
<fI**************@cpmsftngxa10.phx.gbl>
<e4**************@TK2MSFTNGP09.phx.gbl>
<OC*************@TK2MSFTNGP11.phx.gbl>
Subject: Re: Howto: WebService in not Bin folder?
Date: Thu, 16 Dec 2004 11:03:26 +0300
Lines: 36
Organization: BIX
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ep**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09 phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8126
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I'm trying to use webservice business logic only in binary file (dll ) and
asmx-file using for it is not good idea.
"Mujtaba Syed" <mu*****@marlabs.com> wrote in message
news:OC*************@TK2MSFTNGP11.phx.gbl...
Hi Topper:
ASMX file has definition(assembly name) of my WebService object for
ASP.NET.
ASP.NET searching my WebService assembly in bin folder (by default it
defined in machine.config file)
But if i place my WebService dll not in bin folder ASP.NET cann't
found
it and error occured.
If you use Visual Studio .NET, it breaks your web service into two parts, a
.ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
CODEBEHIND attribute in the .ASMX file. Now when you compile your
project, the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file (reference in the URL), it sees the INHERITS attribute and compiles a
temporary class by inheriting the codebehind class from the DLL. So, /BIN is
just the default probing path to lookup assemblies. And since you don't

want
to configure alternative probing paths in web.config, you problem can be
solved by not using a codebehind at all. Put all your code in .ASMX and

be done with!

Mujtaba.


Nov 23 '05 #7
Hi Alexander,

Wow. Wow. Holy wow.

I wish I'd known eaarlier that you were not talking about ASP.net web
services - we could have saved a lot of time.

Since you have developed your own web server and your own web service
stack, there is very little you can gain, in my opinion, from reading about
how IIS hosted web services function and are controlled. Unless you
duplicated exactly the functionality and design/configuration of ASP.net,
nothing I can tell you about how to do something with the Microsoft ASP.net
implementation would apply to your own private code base.

The best I can tell you is to look at your code, your own designs, and then
see if you have provided the kind of control you desire. I can't comment
on your implementation, or on the cassini example.

I wish you luck,

Dan Rogers
Microsoft Corporation
--------------------
Reply-To: "Topper" <al****************@bix.ru>
From: "Topper" <al****************@bix.ru>
References: <#$**************@TK2MSFTNGP15.phx.gbl>
<fI**************@cpmsftngxa10.phx.gbl>
<e4**************@TK2MSFTNGP09.phx.gbl>
<OC*************@TK2MSFTNGP11.phx.gbl>
<ep**************@TK2MSFTNGP09.phx.gbl>
<va**************@cpmsftngxa10.phx.gbl>
Subject: Re: Howto: WebService in not Bin folder?
Date: Fri, 17 Dec 2004 15:35:50 +0300
Lines: 144
Organization: BIX
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <Ov**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXS01.phx.gbl!cpmsftn gxa06.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8165
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Ok.
I've develop project for PDA terminals. There're two components - server
(PC) and PDA-client(s).
My project is a part of another commertial solution and used as
internet/intranet solution. But it is not Internet application.

The one of common goals of my project sounds like this:
(!)Server part must be as a black box ("pandora box") - it must be prevent
for any changes and customisations 'cause
it planned to use as a commertial platform for another terminal clients
development(!).

Compact framework supports only two ways for data exchange between client
and server (as i know) - one is Messaging (using SOAP/XML messages exchange
over HTTP or TCP). The second is webservices. I've choose second 'cause it
is a simply to use, development, flexible and simply for any enhancements.
The first one is hardly scalable and flexible because i must to declare any
SOAP/XML request and response (messages) for client and server.

I'd choose WebService technology for my solution.
But i have one problem - i must not use IIS server (it concerned with
services of another solution parts - i cann't change its logic) .
And i've develop my own web server for hosting own WebServices (i've seen
Cassini Web server sample).

And now i have two problems that i want to solve:
1.My WebService and Web Server use the same assemblies (for example,
core.dll, common.dll etc.) and i have to place its to BIN folder(for
websercvices) and ROOT (for webServer and HTTP handler like asmx-file ) - it
is not good idea, imho.
2. Because this solution is for commertial use, i need to prevent it for any
cases of customisations( hacking, unlicense usage, etc.). The common way is
to prevent any customisations in asmx-files because these files is TEXT
files and its use inside description of codebehind assemblies. Some"bad man"
(hacker, employee, etc.) can write own webservice as mine and path it in
asmx-file instead mine assemply. In this case he takes access to any
information that PDA exchanges to Server - it can be security info like
credit cards info or some private information.

To solving these problems i found in MSDN that i can configure my web
service using .config file.
For one i must use <codebase> or <probing> tags in my .config file.
For second i must create my own IHTTPHandler-class instead asmx-file and
describe it as handler in .config file using <<httpHandlers> tag.
But .config file is also TEXT file and it can be customised by somebody also
(like asmx file) =((

And i have two questions:
1. How can i configure my ASP.NET applications without .config file - only
using some class or object? Maybe i may to secure .config file or place it
into some dll-resources?
2. How can i change default place for my WebServices (BIN-folder)? (It is
not primary goal but i'd describe above why i don't want to divide
WebServer, HTTP-handlers and WebServices dll-files to different folders)

And how can i secure my ASP.NET solution for any LOCAL customisations (any
text file like .config and asmx files)?

May anybody answer me how?

Alexander.
"Dan Rogers" <da***@microsoft.com> wrote in message
news:va**************@cpmsftngxa10.phx.gbl...
Hi Alexander,

Could you be clearer about what the problem is? Why is the Bin directory
something you don't like? And what text file is it that you think there is an issue for? What is that issue?

Dan
--------------------
Reply-To: "Topper" <al****************@bix.ru>
From: "Topper" <al****************@bix.ru>
References: <#$**************@TK2MSFTNGP15.phx.gbl>
<fI**************@cpmsftngxa10.phx.gbl>
<e4**************@TK2MSFTNGP09.phx.gbl>
<OC*************@TK2MSFTNGP11.phx.gbl>
Subject: Re: Howto: WebService in not Bin folder?
Date: Thu, 16 Dec 2004 11:03:26 +0300
Lines: 36
Organization: BIX
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ep**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09 phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8126
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I'm trying to use webservice business logic only in binary file (dll ) and
asmx-file using for it is not good idea.
"Mujtaba Syed" <mu*****@marlabs.com> wrote in message
news:OC*************@TK2MSFTNGP11.phx.gbl...
Hi Topper:
ASMX file has definition(assembly name) of my WebService object for
ASP.NET.
ASP.NET searching my WebService assembly in bin folder (by default it
defined in machine.config file)
But if i place my WebService dll not in bin folder ASP.NET cann't
found
it and error occured.
If you use Visual Studio .NET, it breaks your web service into two parts, a
.ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
CODEBEHIND attribute in the .ASMX file. Now when you compile your
project, the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file (reference in the URL), it sees the INHERITS attribute and compiles a
temporary class by inheriting the codebehind class from the DLL. So, /BIN is
just the default probing path to lookup assemblies. And since you don't

want
to configure alternative probing paths in web.config, you problem can be
solved by not using a codebehind at all. Put all your code in .ASMX and

be done with!

Mujtaba.



Nov 23 '05 #8
Hello, Dan

I've found decision - befor my application starts check and add tags to
"machin.config" every time. It is a simply.

Thanks.

"Dan Rogers" <da***@microsoft.com> wrote in message
news:CB**************@cpmsftngxa10.phx.gbl...
Hi Alexander,

Wow. Wow. Holy wow.

I wish I'd known eaarlier that you were not talking about ASP.net web
services - we could have saved a lot of time.

Since you have developed your own web server and your own web service
stack, there is very little you can gain, in my opinion, from reading about how IIS hosted web services function and are controlled. Unless you
duplicated exactly the functionality and design/configuration of ASP.net,
nothing I can tell you about how to do something with the Microsoft ASP.net implementation would apply to your own private code base.

The best I can tell you is to look at your code, your own designs, and then see if you have provided the kind of control you desire. I can't comment
on your implementation, or on the cassini example.

I wish you luck,

Dan Rogers
Microsoft Corporation
--------------------
Reply-To: "Topper" <al****************@bix.ru>
From: "Topper" <al****************@bix.ru>
References: <#$**************@TK2MSFTNGP15.phx.gbl>
<fI**************@cpmsftngxa10.phx.gbl>
<e4**************@TK2MSFTNGP09.phx.gbl>
<OC*************@TK2MSFTNGP11.phx.gbl>
<ep**************@TK2MSFTNGP09.phx.gbl>
<va**************@cpmsftngxa10.phx.gbl>
Subject: Re: Howto: WebService in not Bin folder?
Date: Fri, 17 Dec 2004 15:35:50 +0300
Lines: 144
Organization: BIX
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <Ov**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXS01.phx.gbl!cpmsftn gxa06.phx.gbl!TK2MSFTNGP08 phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8165
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Ok.
I've develop project for PDA terminals. There're two components - server
(PC) and PDA-client(s).
My project is a part of another commertial solution and used as
internet/intranet solution. But it is not Internet application.

The one of common goals of my project sounds like this:
(!)Server part must be as a black box ("pandora box") - it must be prevent
for any changes and customisations 'cause
it planned to use as a commertial platform for another terminal clients
development(!).

Compact framework supports only two ways for data exchange between client
and server (as i know) - one is Messaging (using SOAP/XML messages exchange over HTTP or TCP). The second is webservices. I've choose second 'cause it
is a simply to use, development, flexible and simply for any enhancements. The first one is hardly scalable and flexible because i must to declare any SOAP/XML request and response (messages) for client and server.

I'd choose WebService technology for my solution.
But i have one problem - i must not use IIS server (it concerned with
services of another solution parts - i cann't change its logic) .
And i've develop my own web server for hosting own WebServices (i've seen
Cassini Web server sample).

And now i have two problems that i want to solve:
1.My WebService and Web Server use the same assemblies (for example,
core.dll, common.dll etc.) and i have to place its to BIN folder(for
websercvices) and ROOT (for webServer and HTTP handler like asmx-file ) - it is not good idea, imho.
2. Because this solution is for commertial use, i need to prevent it for any cases of customisations( hacking, unlicense usage, etc.). The common way is to prevent any customisations in asmx-files because these files is TEXT
files and its use inside description of codebehind assemblies. Some"bad man" (hacker, employee, etc.) can write own webservice as mine and path it in
asmx-file instead mine assemply. In this case he takes access to any
information that PDA exchanges to Server - it can be security info like
credit cards info or some private information.

To solving these problems i found in MSDN that i can configure my web
service using .config file.
For one i must use <codebase> or <probing> tags in my .config file.
For second i must create my own IHTTPHandler-class instead asmx-file and
describe it as handler in .config file using <<httpHandlers> tag.
But .config file is also TEXT file and it can be customised by somebody also (like asmx file) =((

And i have two questions:
1. How can i configure my ASP.NET applications without .config file - only
using some class or object? Maybe i may to secure .config file or place it
into some dll-resources?
2. How can i change default place for my WebServices (BIN-folder)? (It is
not primary goal but i'd describe above why i don't want to divide
WebServer, HTTP-handlers and WebServices dll-files to different folders)

And how can i secure my ASP.NET solution for any LOCAL customisations (any
text file like .config and asmx files)?

May anybody answer me how?

Alexander.
"Dan Rogers" <da***@microsoft.com> wrote in message
news:va**************@cpmsftngxa10.phx.gbl...
Hi Alexander,

Could you be clearer about what the problem is? Why is the Bin directory
something you don't like? And what text file is it that you think there is
an issue for? What is that issue?

Dan
--------------------
Reply-To: "Topper" <al****************@bix.ru>
From: "Topper" <al****************@bix.ru>
References: <#$**************@TK2MSFTNGP15.phx.gbl>
<fI**************@cpmsftngxa10.phx.gbl>
<e4**************@TK2MSFTNGP09.phx.gbl>
<OC*************@TK2MSFTNGP11.phx.gbl>
Subject: Re: Howto: WebService in not Bin folder?
Date: Thu, 16 Dec 2004 11:03:26 +0300
Lines: 36
Organization: BIX
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ep**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09
phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8126
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I'm trying to use webservice business logic only in binary file (dll ) and asmx-file using for it is not good idea.
"Mujtaba Syed" <mu*****@marlabs.com> wrote in message
news:OC*************@TK2MSFTNGP11.phx.gbl...
Hi Topper:

> ASMX file has definition(assembly name) of my WebService object for
> ASP.NET.
> ASP.NET searching my WebService assembly in bin folder (by default it > defined in machine.config file)
> But if i place my WebService dll not in bin folder ASP.NET cann't found
it
> and error occured.

If you use Visual Studio .NET, it breaks your web service into two

parts,
a
.ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
CODEBEHIND attribute in the .ASMX file. Now when you compile your

project, the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file (reference in the URL), it sees the INHERITS attribute and compiles a
temporary class by inheriting the codebehind class from the DLL. So, /BIN
is
just the default probing path to lookup assemblies. And since you don't want
to configure alternative probing paths in web.config, you problem can

be solved by not using a codebehind at all. Put all your code in .ASMX

and be done with!

Mujtaba.



Nov 23 '05 #9

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

Similar topics

0
by: Kristof Thys | last post by:
This is what I do: I create a very simple webservice : new project -> Visual c++ projects -> ASP.Net web service. My old project was a c++ application, I change its properties to a dll. I...
8
by: Martinh | last post by:
Hi I keep getting this error... Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NETFiles\webservice_isds\f12c6a5a\5975001" is denied. Stack Trace: ...
1
by: Ricky K. Rasmussen | last post by:
Hi NG, When connecting to a local WebService one of our customers gets a very strange exception: "File or assembly name gaw9eaqv.dll, or one of its dependencies, was not found." The...
0
by: Daniel | last post by:
hi ng, i have a webservice method that provides a object array that i would like to bind with a datalist on client side. the problem is that a datalist needs property fields to bind to, but...
3
by: ProJee | last post by:
1. How to pass chr(1) (or another special char below 32) to a method in a webservice? It raises an exception when I try to pass it through webservice.htc 2. How to pass chr(255) It doesn't...
0
by: Craig G | last post by:
i am using existing webservice code. so i get the webservice project from SourceSafe onto my D: Drive i then create a virtual directory in IIS and point the path to the webservice code in D: -...
2
by: dan | last post by:
hi ng. i have a asp.net application which is client of an asp.net webservice. now i want to configure a custom error page (in case the sewrvice throws an exception) that provides the...
1
by: Eric Voigt | last post by:
are there special settings applied to IIS5, when creating a webService in VS.NET? I wonder - because when I create a webService (let's call it webservice1) using VStudio.NET on my remote W2K...
5
by: Topper | last post by:
Hello! How to create WebService without IIS and ASP.NET? For example, create WebService for smart device client without ASP.NET/IIS techology. Without ASP.NET and IIS - is a key question!! ...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

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.