Showing posts with label wwwroot. Show all posts
Showing posts with label wwwroot. Show all posts

Saturday, March 31, 2012

Web Server Config

.NET Framework is installed in IIS and it uses its Default Installation ie. everything is in inetpub/wwwroot.

Everyone worth their 2 cents will tell you that an experienced web administrator will change the default folder name of inetpub/wwwroot as the basic DOS attack is launched from there.

If the web server has its wwwroot name changed to something else other than default, asp.net will NOT work with the Default .NET Framework installation and because asp.net is designed to work with classic asp, we are not supposed to change the asp.net default configuration from the IIS MMC. We are supposed to do it with the XML-based machine.config file

Does anyone know how to change it so the ASP.NET will work on aspx pages in a web folder changed from inetpub/wwwroot ?I'm not much an admin but couldn't you just create a website in a directory other than wwwroot and delete the default all through IIS?
you should be able to create a virtual directory for your app anywhere you want... Unless I dont quite understand what you are asking.:confused:
True Cander, ASP.NET will work on any Website and any virtual directory.

"Everyone worth their 2 cents will tell you that an experienced web administrator will change the default folder name of inetpub/wwwroot as the basic DOS attack is launched from there."

SoftwareMaker, what you're saying doesn't make any sence at all. What has the name of your website or the mapping of that website to a physical location on the filesystem to do with a DOS attack, nothing !
Ok, let me explain.

A basic DOS attack comes from fooling the Server to execute a command on the server...eg.cmd.exe...(execute your command here)

In IIS 4 without any patches, an attack can be sent to the server from the browser address bar to run a command in the server, Of course, any commands have to be valid and run from a valid directory. In IIS 4, the server could not parse apart certain strings...a long story...(fool the // with %20 or so on). So technically if you can get to the root of the directory, bingo you can execute the cmd.exe command With IIS, the root is always inetpub/wwwroot

Experienced administrators with enterprises changes all the default settings of the default folder. (of couse enterprises dont use IIS for their server) to escape this form of attack. Of course, the new server software is better now BUT still ppl do change the default name of the webroot juz to be safe...

Ask around and you will see most of them do.
SoftwareMaker from the sounds of it, the method of your defense only goes to the level that you nest your home directory in. On top of it, I think that any web admin "worth their 2 cents" would actually apply any patches the second they're available.
Yep..you're right Shawn.

Anyways seems ppl take offense at my statement abt the 2cents worth...Its just a figure of speech. It is not meant to offend anyone.
A basic DOS attack comes from fooling the Server to execute a command on the server...eg.cmd.exe...(execute your command here)

SoftwareMaker, that's not true !!

What you're talking about is a know buffer overflow bug in IIS. A DOS attack is a totally different thing.

DOS attacks occur when a system is flooded with traffic to the point that it is unable to process legitimate service requests.
OK gijsj

you're right...

I have managed to solve the problem of this thread.

Thanks everyone

Saturday, March 24, 2012

Web Service not working

I have a simple Webservice (the infamous Hello program).
This file is in wwwroot and gets called fine.
****************************************
******************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script Language="Javascript">
var iCallID;
function InitializeService()
{
alert("Before useServer");
service.useService("http://localhost/Hello/Service1.asmx?wsdl","HelloService
");
service.HelloService.callService("HelloWorld");
alert("After callService");
}
function ShowResult()
{
alert(event.result.value);
}
</script>
</head>
<body onload="InitializeService()" id="service"
style="behavior:url(webservice.htc)"
onresult="ShowResult">
</body>
</html>
****************************************
********************************
The webservice.htc file is also in wwwroot.
I get the alert statements in InitializeService. But the ShowResult never
gets Called.
I can call this http://localhost/Hello/Service1.asmx?wsdl fine from IE and
it comes up correctly and runs fine.
I have another service with the same problem, what am I missing?
Thanks,
TomCheck the security in your IE. I am not sure which option it is. I have
noticed that sometimes Javascript do not show error message when there is a
security restriction.
--
Vijayakrishna
Software Architect
"tshad" wrote:

> I have a simple Webservice (the infamous Hello program).
> This file is in wwwroot and gets called fine.
> ****************************************
******************************
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Untitled Document</title>
> <script Language="Javascript">
> var iCallID;
> function InitializeService()
> {
> alert("Before useServer");
> service.useService("http://localhost/Hello/Service1.asmx?wsdl","HelloServi
ce
> ");
> service.HelloService.callService("HelloWorld");
> alert("After callService");
> }
> function ShowResult()
> {
> alert(event.result.value);
> }
> </script>
> </head>
> <body onload="InitializeService()" id="service"
> style="behavior:url(webservice.htc)"
> onresult="ShowResult">
> </body>
> </html>
> ****************************************
********************************
> The webservice.htc file is also in wwwroot.
> I get the alert statements in InitializeService. But the ShowResult never
> gets Called.
> I can call this http://localhost/Hello/Service1.asmx?wsdl fine from IE and
> it comes up correctly and runs fine.
> I have another service with the same problem, what am I missing?
> Thanks,
> Tom
>
>

Web Service not working

I have a simple Webservice (the infamous Hello program).

This file is in wwwroot and gets called fine.
************************************************** ********************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script Language="Javascript">
var iCallID;

function InitializeService()
{
alert("Before useServer");

service.useService("http://localhost/Hello/Service1.asmx?wsdl","HelloService
");
service.HelloService.callService("HelloWorld");
alert("After callService");
}

function ShowResult()
{
alert(event.result.value);
}
</script>
</head
<body onload="InitializeService()" id="service"
style="behavior:url(webservice.htc)"
onresult="ShowResult"
</body>
</html>
************************************************** **********************

The webservice.htc file is also in wwwroot.

I get the alert statements in InitializeService. But the ShowResult never
gets Called.

I can call this http://localhost/Hello/Service1.asmx?wsdl fine from IE and
it comes up correctly and runs fine.

I have another service with the same problem, what am I missing?

Thanks,

TomCheck the security in your IE. I am not sure which option it is. I have
noticed that sometimes Javascript do not show error message when there is a
security restriction.
--
Vijayakrishna
Software Architect

"tshad" wrote:

> I have a simple Webservice (the infamous Hello program).
> This file is in wwwroot and gets called fine.
> ************************************************** ********************
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Untitled Document</title>
> <script Language="Javascript">
> var iCallID;
> function InitializeService()
> {
> alert("Before useServer");
> service.useService("http://localhost/Hello/Service1.asmx?wsdl","HelloService
> ");
> service.HelloService.callService("HelloWorld");
> alert("After callService");
> }
> function ShowResult()
> {
> alert(event.result.value);
> }
> </script>
> </head>
> <body onload="InitializeService()" id="service"
> style="behavior:url(webservice.htc)"
> onresult="ShowResult">
> </body>
> </html>
> ************************************************** **********************
> The webservice.htc file is also in wwwroot.
> I get the alert statements in InitializeService. But the ShowResult never
> gets Called.
> I can call this http://localhost/Hello/Service1.asmx?wsdl fine from IE and
> it comes up correctly and runs fine.
> I have another service with the same problem, what am I missing?
> Thanks,
> Tom
>

Monday, March 12, 2012

Web Services Not Working

Dear Gurus:

On my local computer I am running IIS 5.0 and I have written a web service, and I have put all relevant files in my local inetpub/wwwroot folder and my web service works fine. I get the proper asmx interface.

But when I move the relevant web service files to a server running IIS 6.0 and open IE and put in the correct URL all I get is the following line of text at the top of my page in IE:

<%@dotnet.itags.org. WebService Language="c#" Codebehind="SalesReport.asmx.cs" Class="SalesReportWebService.SalesReport" %>

My web service was written and compiled with VisualStudio.net.

Yes, I have added my .dll as an allowed web service extension.

Do I have to register my web service somewhere? Any idea what might be going wrong?

Thank you in advance,

Kailin.

OK I have now fixed this problem.

The problem was somebody had modified the machine.config file on the computer where the web service was not working. The <httphandlers> section that setasmx as a recognized file type in themachine.config file was removed rendering the web service inoperable. I have now replaced the broken machine.config file with a default machine.config file and this fixed the problem.

Thank you to anyone who took some time to look into this issue.