Tanmaya Thopate, Chincholi Morachi, Low cost WEBSITE development in Pune, Windows Tips n Tricks

Tuesday, September 30, 2008

Login failed for user computer\ASPNET

Common reason behind this is, with a Web application is trying to access a Microsoft SQL Server. The definite error or exception that is raised depends on whether the Web server is also running SQL Server? This problem arises because the Web application is not passing valid credentials to SQL Server. You can check following steps,

Login failed for user computer\ASPNET

Thursday, September 25, 2008

ASP.NET Web Applications under IIS 6.0


Hi All,

You might be all curious about How ASP.NET web applications run under IIS6.0 on Windows Web hosting Server

In the following post, I've briefed it, may it will help you to understand an idea about its layout.


Your ASP.NET application need to be under an IIS virtual directory, working under application root. These ASP.NET applications have compiled assemblies settings stored in a text-based Web.config file; pages; server controls; and XML Web services..... ASP.NET Web Applications under IIS 6.0

Sunday, September 21, 2008

How to prevent MSSQL injection?

How to prevent MSSQL injection?

In reaction to the recent mass MSSQL injection attacks, Microsoft has developed a new static code examination tool for discovery MSSQL Injection vulnerabilities in ASP code.
Web site developers can run the tool on their ASP source code to recognize the root cause of the attack and tackle them to reduce their coverage to future attacks in the MSSQL databases.

The tool will scan ASP source code and generate warnings linked to SQL Injection vulnerabilities. The tool also provides explanation support that can be used to develop the scrutiny of the code which will prevent MSSQL injection.

Directions to complete, follow these steps :

Download from this link and install the Microsoft Source Code Analyzer for Microsoft SQL Injection :

1. Download msscasi_asp_pkg.exe to a temporary directory.
2. Run msscasi_asp_pkg.exe.
3. Enter an installation directory when prompted.
4. After extracting the files, read the usage section of the Readme.htm file for next steps.

Friday, September 19, 2008

What is FSMO?

FSMO is Flexible Single Master Operations, There are five FSMO roles:

* PDC emulator (one per domain): It permits Windows Server 2003 to perform as a Windows NT primary domain controller (PDC), and it not only offers replication support for Windows NT-based backup domain controllers (BDCs), but also helps with time and group policy synchronization.

* Infrastructure master (one per domain): It is responsible for updating the group-to-user references every time the members of groups alter or obtain new names.

* Relative ID (RID) master (one per domain): It makes sure that every object formed has a unique identification number.

* Schema master (one per forest): It is responsible for maintaining and modifying the Active Directory schema.

* Domain naming master (one per forest): It is responsible for the addition and deletion of domains in a forest.

Now the real thing is which servers hold these roles in an Active Directory forest?

To find the PDC emulator, the infrastructure master, and the RID master, follows these steps:

1. Go to Start | Administrative Tools | Active Directory Users and Computers.
2. Right-click the domain, and select Operations Master.

The resultant three tabs will explain you which server holds each respective role.

To find the schema master, follow these steps:

1. Go to Start | Run.
2. Enter regsvr32 schmmgmt.dll in the Open text box, and click OK.
3. Go to Start | Run.
4. Enter mmc in the Open text box, and click OK.
5. Go to File | Add/Remove Snap-In, and click Add.
6. Click Active Directory Schema, click Add, click Close, and click OK.
7. Right-click Active Directory Schema, and select Operations Master from the shortcut menu.

To find the domain naming master, follow these steps:

1. Go to Start | Administrative Tools | Active Directory Domains And Trusts.
2. Right-click Active Directory Domains And Trusts, and select Operations Master from the list.

Each option features a modify button, which allows you to move the role to another domain controller.

Wednesday, September 17, 2008

Execute a batch file in ASP

How do I execute a batch file in ASP?

On the Web hosting Server , one needs WSH, ASPExec or DynuExec available on the Hosting Server to execute the scripts which tries to execute batch files.

For example,

1) To start w3svc.
----------------------------------------------------------------------------------------------
<%
set wshell = CreateObject("WScript.Shell") wshell.run "c:\execute.bat"
set wshell = nothing
%>
----------------------------------------------------------------------------------------------

This bat file contains
----------------------------------------------------------------------------------------------
net stop iisadmin /y
net start w3svc
----------------------------------------------------------------------------------------------

2) Ping response in your ASP code.
----------------------------------------------------------------------------------------------
<% Response.Buffer = true %>
<%
url = "www.host.co.in"
Set objWShell = CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec("ping " & url)
strPResult = objCmd.StdOut.Readall()
set objCmd = nothing: Set objWShell = nothing

strStatus = "offline"
if InStr(strPResult,"TTL=")>0 then strStatus = "online"

response.write url & " is " & strStatus
response.write ".
" & replace(strPResult,vbCrLf,"
")

%>
----------------------------------------------------------------------------------------------

Some time, you may come across errors if code is improrely configured:
1)
----------------------------------------------------------------------------------------------
Error Type:
(0x80070002)
/.asp, line
----------------------------------------------------------------------------------------------

it means that the file is not found, you will need to check the name and path of the file

2)
----------------------------------------------------------------------------------------------
Microsoft VBScript runtime error '800a0046'
Permission denied
/.asp, line
----------------------------------------------------------------------------------------------

Either IUSR_MachineName or an authenticated user does not have permissions to the file or folder or the IUSR does not have permissions to one or more of the commands being called within the file. Never assume that IUSR_machineName is included in the "Everyone" group... and never just give "Everyone" full access to this folder, or put IUSR in the Administrators group. You have to explicitly give IUSR permissions to file, folder, and anything else that the command has to touch.

And one more thing, never include such script which needs users interaction, because this code runs in background and may be waiting for response from the User. This may lead to Web hosting Server hang.

Sunday, September 14, 2008

Google is now 10 years old...

Happy Birthday Google, my friend!!!

When Larry Page and Sergey Brin established Google Inc. on September 7, 1998, they had little more than their creativity, four computers and an investor's $100,000 bet on their belief that an Internet search engine could change the humankind.

In the most recent example of its persistent expansion, Google has just released a Web Browser to make its search engine and other online services even easy to get to and attractive. Not every peripheral step has gone smoothly, though; several of the company's additional products have flopped or never lived up to the publicity.

But the lengthy to-do list also includes: making digital copies of the entire world's books; establishing electronic file cabinets for people's fitness account; leading the substitute power charge away from fossil fuels; selling computer programs to businesses over the Internet; and tweaking its search engine so it can better understand requests stated in basic words, like a human would.

Google as an daunting kingdom. It holds commanding leads in both the Internet search and advertising markets. The company processes nearly two-thirds of the world's online search requests.

The supremacy has enabled Google to rake in $48 billion from Internet Ads since 2001. Google hasn't hoarded all of that capital: the company has paid $15 billion in commissions to the Web sites that run its ads during the same period, serving to support major online destinations like AOL, Ask.com and MySpace as well as an array of bloggers.
 
Add to Technorati Favorites