473,570 Members | 2,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4168
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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTNG XA06.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8
.phx.gbl!TK2MSF TNGP15.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8069
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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(asse mbly 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***@microsof t.com> wrote in message
news:fI******** ******@cpmsftng xa10.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTNG XA06.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8 phx.gbl!TK2MSFT NGP15.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8069
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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(asse mbly 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*****@marlab s.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
Hi Topper:
ASMX file has definition(asse mbly 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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9
.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8126
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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*****@marlab s.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
Hi Topper:
ASMX file has definition(asse mbly 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 <<httpHandler s> 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***@microsof t.com> wrote in message
news:va******** ******@cpmsftng xa10.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9 phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8126
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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*****@marlab s.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
Hi Topper:
ASMX file has definition(asse mbly 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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTNG XS01.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8
.phx.gbl!TK2MSF TNGP10.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8165
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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 <<httpHandler s> 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***@microsof t.com> wrote in message
news:va******** ******@cpmsftng xa10.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9 phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8126
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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*****@marlab s.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
Hi Topper:
ASMX file has definition(asse mbly 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.con fig" every time. It is a simply.

Thanks.

"Dan Rogers" <da***@microsof t.com> wrote in message
news:CB******** ******@cpmsftng xa10.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTNG XS01.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8 phx.gbl!TK2MSFT NGP10.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8165
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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 <<httpHandler s> 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***@microsof t.com> wrote in message
news:va******** ******@cpmsftng xa10.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
Path:

cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9
phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8126
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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*****@marlab s.com> wrote in message
news:OC******** *****@TK2MSFTNG P11.phx.gbl...
Hi Topper:

> ASMX file has definition(asse mbly 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
820
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 build it, and add a reference to the web service -> Add reference -> ..NET -> browse for the dll Then I include the headerfile from the oldproject,...
8
2149
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: System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
1
1223
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 strange part is that the name of the assembly can vary, and has nothing to do with the names of the assemblies used in neither the WebService or the
0
1079
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 webservice client side, the objects properties are recognized as public fields. And in the wsdl file, there is no difference between for example: ...
3
1447
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 raise an exception, but another character comes to the server in some cases (different server= different results).. probably some
0
969
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: - all pretty straight forward but then when i go to add the WebService into my solution i "open existing project from web" which opens the localhost...
2
2399
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 soapexception detail property as text. but when defined in web.config, the error page doesn't provide access to the thrown exception anymore. i think that i...
1
1792
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 IIS5 it works fine and without any problems. When I don't use the VStudio.NET Wizard but only copy the .asmx and bin/*.dll files to another web (on...
5
5382
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!! May somebody knows where can i get information or examples for current subject....
0
7729
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7950
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8151
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8000
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6332
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5247
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2133
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 we have to send another system
1
1238
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
974
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.