rss search

next page next page close

IIS7: Security is Painful for Classic ASP

IIS7: Security is Painful for Classic ASP

An error occurred on the server when processing the URL. Please contact the system administrator

 

I just got a Vista Machine for 30 days in Office, has my new machine may take some time to come and and i wrote some code in good old classic ASP code today. On IIS7 I only got the following though:

An error occurred on the server when processing the URL. Please contact the system administrator

After investigating a bit I figured out that we changed the default for the “scriptErrorSentToBrowser” flag in IIS7. It’s now false and you always get the error above. Here is how to change it:

1) Start an elevated command prompt. Right-click the command shell item in the Start-Accessories menu and select “CMD and run as Administrator”.

2) Run the following command: %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

On Live production Enviroment Once you are done with debugging your ASP app please set it back to false. There are lots of ‘evildoers’ out there! :)

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

next page next page close

Time Base Flagging with ASP datetime function

Time Base Flagging with ASP datetime function

<%

strStartTime1 = "13/02/2012 05:10:00"
strEndTime1 = "16/02/2012 05:11:00"

strDiff1 = DateDiff("n",strStartTime1,strEndTime1)

'response.write strDiff1
'response.write "<hr>"

if strDiff1 >=0  then
%>
<center> <h3>"ORDERS PLACED NOW FOR VALENTINE'S DAY - 14TH FEBRUARY WILL BE DELIVERED LATEST BY 15TH FEBRUARY"</h3> </center>
<%
else

end if 

%>
Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

next page next page close

Sql Server Get Comma Separated list And Search Keyword

Sql Server Get Comma Separated list

SELECT empowner,
 SUBSTRING(
 (
  SELECT ( ' ' + dept)
  FROM Zo_Departments t2
  WHERE t1.empowner = t2.empowner
  ORDER BY t1.empowner, t2.empowner
  FOR XML PATH('')
 ), 3, 1000)
FROM Zo_Departments t1  where t1.empowner=2803
GROUP BY empowner

 

This data which looks like this

empowner  dept
2803 BS-SUPPORT
2803 E-SUPPORT
2803 UK-US-NZ
2803 APPLICATION-SUPPORT
2803 Pranav Ajgaonkar

 

will look like this

empowner (No column name)
2803 S-SUPPORT E-SUPPORT UK-US-NZ APPLICATION-SUPPORT Pranav Ajgaonkar

 

SELECT empowner,
 SUBSTRING(
 (
  SELECT ( ' ' + dept)
  FROM Zo_Departments t2
  WHERE t1.empowner = t2.empowner
  ORDER BY t1.empowner, t2.empowner
  FOR XML PATH('')
 ), 3, 1000),
(SELECT top 1 PATINDEX('%support%', dept) dept FROM Zo_Departments where Zo_Departments.empowner=t1.empowner) As EXCESS_BAGGAGE,
(SELECT top 1 PATINDEX('%support%', dept) dept FROM Zo_Departments where Zo_Departments.empowner=t1.empowner) As BAGGAGE,
(SELECT top 1 PATINDEX('%support%', dept) dept FROM Zo_Departments where Zo_Departments.empowner=t1.empowner) As EXCESS_BG,
(SELECT top 1 PATINDEX('%support%', dept) dept FROM Zo_Departments where Zo_Departments.empowner=t1.empowner) As EXCESS_LUGGAGE,
(SELECT top 1 PATINDEX('%support%', dept) dept FROM Zo_Departments where Zo_Departments.empowner=t1.empowner) As LUGGAGE
FROM Zo_Departments t1  where t1.empowner=2803
GROUP BY empowner
Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

next page next page close

Things you should know about NoSQL databases

Things you should know about NoSQL databases

 

Five advantages of NoSQL

1: Elastic scaling

For years, database administrators have relied on scale up — buying bigger servers as database load increases — rather than scale out — distributing the database across multiple hosts as load increases. However, as transaction rates and availability requirements increase, and as databases move into the cloud or onto virtualized environments, the economic advantages of scaling out on commodity hardware become irresistible.

RDBMS might not scale out easily on commodity clusters, but the new breed of NoSQL databases are designed to expand transparently to take advantage of new nodes, and they’re usually designed with low-cost commodity hardware in mind.

2: Big data

Just as transaction rates have grown out of recognition over the last decade, the volumes of data that are being stored also have increased massively. O’Reilly has cleverly called this the “industrial revolution of data.” RDBMS capacity has been growing to match these increases, but as with transaction rates, the constraints of data volumes that can be practically managed by a single RDBMS are becoming intolerable for some enterprises. Today, the volumes of “big data” that can be handled by NoSQL systems, such as Hadoop, outstrip what can be handled by the biggest RDBMS.

3: Goodbye DBAs (see you later?)

Despite the many manageability improvements claimed by RDBMS vendors over the years, high-end RDBMS systems can be maintained only with the assistance of expensive, highly trained DBAs. DBAs are intimately involved in the design, installation, and ongoing tuning of high-end RDBMS systems.

NoSQL databases are generally designed from the ground up to require less management:  automatic repair, data distribution, and simpler data models lead to lower administration and tuning requirements — in theory. In practice, it’s likely that rumors of the DBA’s death have been slightly exaggerated. Someone will always be accountable for the performance and availability of any mission-critical data store.

4: Economics

NoSQL databases typically use clusters of cheap commodity servers to manage the exploding data and transaction volumes, while RDBMS tends to rely on expensive proprietary servers and storage systems. The result is that the cost per gigabyte or transaction/second for NoSQL can be many times less than the cost for RDBMS, allowing you to store and process more data at a much lower price point.

5: Flexible data models

Change management is a big headache for large production RDBMS. Even minor changes to the data model of an RDBMS have to be carefully managed and may necessitate downtime or reduced service levels.

NoSQL databases have far more relaxed — or even nonexistent — data model restrictions. NoSQL Key Value stores and document databases allow the application to store virtually any structure it wants in a data element. Even the more rigidly defined BigTable-based NoSQL databases (Cassandra, HBase) typically allow new columns to be created without too much fuss.

The result is that application changes and database schema changes do not have to be managed as one complicated change unit. In theory, this will allow applications to iterate faster, though,clearly, there can be undesirable side effects if the application fails to manage data integrity.

Five challenges of NoSQL

The promise of the NoSQL database has generated a lot of enthusiasm, but there are many obstacles to overcome before they can appeal to mainstream enterprises. Here are a few of the top challenges.

1: Maturity

RDBMS systems have been around for a long time. NoSQL advocates will argue that their advancing age is a sign of their obsolescence, but for most CIOs, the maturity of the RDBMS is reassuring. For the most part, RDBMS systems are stable and richly functional. In comparison, most NoSQL alternatives are in pre-production versions with many key features yet to be implemented.

Living on the technological leading edge is an exciting prospect for many developers, but enterprises should approach it with extreme caution.

2: Support

Enterprises want the reassurance that if a key system fails, they will be able to get timely and competent support. All RDBMS vendors go to great lengths to provide a high level of enterprise support.

In contrast, most NoSQL systems are open source projects, and although there are usually one or more firms offering support for each NoSQL database, these companies often are small start-ups without the global reach, support resources, or credibility of an Oracle, Microsoft, or IBM.

3: Analytics and business intelligence

NoSQL databases have evolved to meet the scaling demands of modern Web 2.0 applications. Consequently, most of their feature set is oriented toward the demands of these applications. However, data in an application has value to the business that goes beyond the insert-read-update-delete cycle of a typical Web application. Businesses mine information in corporate databases to improve their efficiency and competitiveness, and business intelligence (BI) is a key IT issue for all medium to large companies.

NoSQL databases offer few facilities for ad-hoc query and analysis. Even a simple query requires significant programming expertise, and commonly used BI tools do not provide connectivity to NoSQL.

Some relief is provided by the emergence of solutions such as HIVE or PIG, which can provide easier access to data held in Hadoop clusters and perhaps eventually, other NoSQL databases. Quest Software has developed a product — Toad for Cloud Databases — that can provide ad-hoc query capabilities to a variety of NoSQL databases.

4: Administration

The design goals for NoSQL may be to provide a zero-admin solution, but the current reality falls well short of that goal. NoSQL today requires a lot of skill to install and a lot of effort to maintain.

5: Expertise

There are literally millions of developers throughout the world, and in every business segment, who are familiar with RDBMS concepts and programming. In contrast, almost every NoSQL developer is in a learning mode. This situation will address naturally over time, but for now, it’s far easier to find experienced RDBMS programmers or administrators than a NoSQL expert.

Conclusion

NoSQL databases are becoming an increasingly important part of the database landscape, and when used appropriately, can offer real benefits. However, enterprises should proceed with caution with full awareness of the legitimate limitations and issues that are associated with these databases.

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

next page next page close

Print Screen with Autoit

Print Screen with Autoit

; Press Esc to Print Screen and terminate script
#include <GDIPlus.au3>
#include <ClipBoard.au3>

Global $UnPaused
HotKeySet("1", "TogglePause")
HotKeySet("{ESC}", "Terminate")

While 1
    Sleep(100)
    ToolTip("Script is Paused",0,0)
WEnd

Func TogglePause()
    $UnPaused = NOT $UnPaused
    While $UnPaused
        ToolTip("Sending...",0,0)
        Send("z")
    WEnd
EndFunc

Func Terminate()

; Capture full screen
Send("{PRINTSCREEN}") ; Screen
;Send("!{PRINTSCREEN}") ; window

_Main()

ShellExecute(@ScriptDir & "\Image.jpg")
    Exit 0
EndFunc

Func _Main()
    Local $hBmp, $hImage

    If Not _ClipBoard_Open(0) Then _WinAPI_ShowError("_ClipBoard_Open failed")
    $hBmp = _ClipBoard_GetDataEx($CF_BITMAP)
    _GDIPlus_Startup()
    $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBmp)

    ; Save bitmap to file
    _GDIPlus_ImageSaveToFile($hImage, @ScriptDir & "\Image.jpg") ;$sNewName)

    _GDIPlus_BitmapDispose($hImage)
    _GDIPlus_Shutdown()
    _ClipBoard_Close()
EndFunc ;==>_Main

(Contains 1 attachments.)
Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

next page

IIS7: Security is Painful for Classic ASP

Share|IIS7: Security is Painful for Classic ASP An error occurred on the server when...
article post

Time Base Flagging with ASP datetime function

Share|Time Base Flagging with ASP datetime function <% strStartTime1 = "13/02/2012...
article post

Sql Server Get Comma Separated list And Search Keyword

Share|Sql Server Get Comma Separated list SELECT empowner, SUBSTRING( ( SELECT ( ' '...
article post

Things you should know about NoSQL databases

Share|Things you should know about NoSQL databases   Five advantages of NoSQL 1:...
article post

Print Screen with Autoit

Share|Print Screen with Autoit ; Press Esc to Print Screen and terminate script #include...
article post

Devguru.in is Stephen Fry proof thanks to caching by WP Super Cache