Double Scape Error

March 5, 2009

1.      Locate the following directory:
%windir%\System32\inetsrv\config
2.     Open the applicationHost.config file in a text editor such as Notepad.
3.     In the applicationHost.config file, locate the following code:

<section name=”requestFiltering” overrideModeDefault=”Deny” />

4.     Replace the code that you found in step 3 with the following code:

<section name=”requestFiltering” overrideModeDefault=”Allow”/>

5.
Open the web.config of your DotNetNuke installation in a text editor such as Notepad.
6.

Insert this code into the web.config after <configSections>

<configuration>
<configSections>

</configSections>

<system.webServer>
<security>
<requestFiltering allowDoubleEscaping=”True”/>
</security>
</system.webServer>

</configuration>

This is for IIS 7.0

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/9/threadid/110016/scope/posts/Default.aspx

Web Application Template missing in Visual Studio 2005

February 6, 2009

http://forums.asp.net/p/989112/1282012.aspx

http://geekswithblogs.net/ehammersley/archive/2005/11/08/59451.aspx

Function on a linked server (SQL) does not work

October 29, 2008

http://blogs.technet.com/wardpond/archive/2006/04/15/database-programming-user-defined-functions-and-linked-server-connections.aspx

Database Programming: User-Defined Functions And Linked Server Connections

This post addresses an edge-case programming issue, but if you’ve ever run into into it, this may be a useful trick to have in your back pocket.  This discussion applies to both SQL Server 2000 and SQL Server 2005; in SQL Server 2005, all databases involved must have SET TRUSTWORTHY ON run against them.

A colleague wished to call a user-defined function (UDF) housed on a linked server.  SQL Server does not allow cross-server calls to a user-defined function, so this call..

SELECT

  String
FROM    OPENQUERY(ServerX, ‘SELECT String FROM MDPGJan031Issue.dbo.ExplodeSet(”MEDPSDEV”)’)

.. produces an error message.  The solution in this case is to place a stored procedure on ServerX that calls the UDF:

CREATE

PROCEDURE dbo.CallTheUDF
AS
SELECT
  String
FROM    dbo.ExplodeSet (‘MEDPSDEV’)

.. and then call the stored procedure over the linked server connection:

SELECT

  String
FROM    OPENQUERY(ServerX, ‘EXEC MDPGJan031Issue.dbo.CallTheUDF’)

This is a relatively simplistic example; you can also put the parameter to the UDF into a memory variable if you wish, which is certainly much more flexible.

     -wp

Published Saturday, April 15, 2006 11:00 PM by Ward Pond

SQL Status: SUSPECT

October 27, 2008
I have been meaning to post this but it is just too busy here in the office, so, am taking this time now. I stumbled upon this last 24-Oct-2008, first time I heard this status  message on SQL.
http://www.sqlservercentral.com/articles/Administering/unmarksuspect/137/
A database can be marked for many reasons. Generally it falls into the following conditions :
  • A database or log file is missing.
  • In SQL 6.5, a device may not be present or in 7.0/2000 a file may not exist.
  • SQL Server may not have been able to restore the database in ample time.
  • The database could be corrupt.
  • The database is being help by the operating system. This could be a 3rd party
    backup software or defrag software. I’ve had even a virus scanning software cause this once.
  • SQL Server does not have enough space to recover the database on startup.

To fix this problem, perform the following functions:

  1. Review the SQL Server and NT error logs to see if you can find where the problem occured.
  2. Start SQL Server in single user mode.
    • Go to your control panel and services.
    • Stop SQL Server
    • Add the -m switch in the parameters pane below.
    • Start SQL Server
  3. Run sp_resetstatus with the @dbname parameter.
    (ie : sp_resetstatus @dbname = “pubs”)
  4. Perform detailed DBCC checks (CHECKDB, CHECKALLOC, etc)
  5. Run a few random queries to see if you experience any problems.
  6. If no problems occur, stop and start SQL Server and open the database to production.As an absolute last resort, you can place your database in emergency mode. By placing it in this mode, you will be allowed to copy data out of the database, even if the data is corrupt.
    To place your database in emergency mode, use the
    following command:

    SP_CONFIGURE ‘allow updates’, 1

    RECONFIGURE WITH OVERRIDE

    GO

    UPDATE master..sysdatabases set status = -32768 WHERE name = ‘pubs’

    GO

    SP_CONFIGURE ‘allow updates’, 0

    RECONFIGURE WITH OVERRIDE

    You can then BCP data out and place it into a different database.

more on MSMQ- windows service

October 16, 2008

yeah yeah, so i got a message to msmq… now, i have to create a program to read it and fire whatever command that i need… so, i created a windows service. 1st- i got stumped on installing it and having the service to be available in the services list. then i need an intall service etc. and finally got it in the list.

http://msdn.microsoft.com/en-us/magazine/cc164041.aspx - security on msmq (not that impt)

then when i started it, the listener won’t fire or get the message in the queue… there’s a site that explains about debugging windows service: http://www.ondotnet.com/pub/a/dotnet/2003/09/02/debuggingsvcs.html

i didn’t actually have any use (but just tried it) of a dubugger, ‘coz i think i got it all wrong in the first place.

since i’m stumped, i also stumbled here: http://www.dotnetcoders.com/web/learning/cert/exams/services/windowsservices.aspx

on more on windows services.

some security again: http://www.15seconds.com/issue/020312.htm (not that helpful but who knows)

then i finally made it run and do whatever it supposed to do.

chow….

n.r. (not relevant) thing for today is a commotion in the higher ups (they always do that) about the population in china- and one actually said that of all 1.3 billion chinese, they couldn’t get/hire a chinese speaking support in china and they have to hire a chinese speaking person in the philippines instead.

WebService, MSMQ

October 13, 2008

Yeah, they are around and I think I have written a sample webservice many times before already but i didn’t just have that opportunity to work on it and apply it in a project.

today is one of those day as such getting refreshed again over webservice.

last week, I was approached by my manager (dev manager) and talked about me having to write a webservice that will talk to MSMQ (windows service) that will eventually run a stored procedure in the server. at most, people are being intimidated or worst panics when they heard of having to be involve in a new technology (or not really new ‘coz these terms are heard of way long before… webservice, msmq) but being involved or having to write one (webservice) that utilizes (msmq) for the first time, gives you the jitters somehow…. i just replied “ok” yah yah these things can be searched and found on the net anyways…

i didn’t even paid any attention to this this past weekend, I figured, I’ll start on it monday… and so this morning I even hesitated it’s around 11nish (or 11ses, from mr. paddington bear which is a new google logo today, oct. 13) i think when I got to write a new webservice that  invokes/add a new message to MSMQ, whew! that was easy… then I got stuck up on retrieving the message with the error in Formatter etc. but i also found some answers on the web.

I got some useful links for today so here they are:

about MSMQ

http://www.15seconds.com/issue/031202.htm

that freakin Formatter error

http://msdn.microsoft.com/en-us/library/system.messaging.xmlmessageformatter.aspx

… and places to visit while in Australia (nah, this one is not related)

http://au.answers.yahoo.com/question/index?qid=20080923211430AAkj7oX

another day, another first time

assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE

September 29, 2008

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65627. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Could not load file or assembly ‘scm.db, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A) System.IO.FileLoadException: at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString)

http://support.microsoft.com/kb/918040

Related: http://msdn.microsoft.com/en-us/library/ms187861.aspx

Hello world!

September 29, 2008

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!


Follow

Get every new post delivered to your Inbox.