By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,796 Members | 1,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,796 IT Pros & Developers. It's quick & easy.

Howto: WebService in not Bin folder?

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.