Tuesday, March 01, 2011

ASP.NET application does not work: 0x80070021. This configuration section cannot be used at this path

After reinstalling the Windows, Suite ASP.NET application does not work: 0x80070021. This configuration section cannot be used at this path

Unexpectedly help comes from Microsoft Knowledge Base:

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

See case #9

http://learn.iis.net/page.aspx/145/how-to-use-locking-in-iis-70-configuration

Editing the %windir%\system32\inetsrv\config\applicationHost.config helped.

Error message:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information

Module

AnonymousAuthenticationModule

Notification

AuthenticateRequest

Handler

PageHandlerFactory-ISAPI-2.0-64

Error Code

0x80070021

Config Error

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

Config File

\\?\C:\Dev\531Patch00\Root\Web\Logon\web.config

Thursday, February 03, 2011

Importance of order

Hi.
Just what I understand while trying to update a super-customized database came from client to our newest version:
There can never be too much journaling and logging!!!
Every megabyte you spent for detailed history of your application life can save you hours of your life those you'll damn hundred times otherwise.
Think early :-)

Wednesday, August 25, 2010

Self-hosted WCF service with SSL certificate security

Spent the whole day trying to force my self-hosted service to respond.

Finally what has helped is two lines below to execute (port, certhash, path and user name are up to you. Not sure about appid yet :-) ):

netsh http add urlacl url=httpS://+:2202/PatientService user=DOMAIN\user

netsh http add sslcert ipport=0.0.0.0:2202 certhash=ea81a9b4c330247f966d23d7e21266171f92cd47 appid={4EF5AB95-0A11-43b1-842C-51D56687CC7A}

Now need to understand - WHY??

Thursday, July 08, 2010

Tuesday, April 20, 2010

SQL Server 2008 setup: Error "Restart Computer Failed"

When trying to install SQL Server 2008 I found that it requires me to restart computer even after I did it two times.
It was really bad.

However, there are kind people around!
Especially here:
http://www.sqlcoffee.com/Troubleshooting051.htm
So the reason was in pending after-reboot file copying requested (and never performed)

I believe this might cause some mistakes if you really have pending files, so make sure to reboot first.

Thursday, February 04, 2010

Needed to script the MS SQL database including data.

Strangely :-), but Microsoft did it well:
http://blog.sqlauthority.com/2007/11/16/sql-server-2005-generate-script-with-data-from-database-database-publishing-wizard/

Visual Studio 2008 also have such tool built in.

(However I am not sure about complex databases (like encrypted) yet...)

Friday, January 22, 2010

how can I set the authentication mode for a SQLServer from code?

Change
HKLM\Software\Microsoft\Microsoft SQL Server\\MSSQLServer\LoginMode
1 = integrated only, 2-mixed

For you will need to use MSSQL.n, where n relates to the instance you are interested in. You can find the right value by looking at HKLM\Software\Microsoft\Microsoft SQL Server\Instance Names\SQLame, and looking for the value that matches your instance name. SQL Express has an instance name of SQLEXPRESS, and the default SQL 2005 instance has a name of MSSQLSERVER. (on my box ...\Instance Names\SQL\SQLEXPRESS has a value of MSSQL.4)

From here: http://www.sqlservercentral.com/Forums/Topic439615-359-1.aspx

Thursday, January 21, 2010

Monday, July 27, 2009

PM Labs 2009 conference by Luxoft Training Center

Hi all,

Last Saturday (2009 July 25th) I've attended a quite funny event - PM Labs 2009 held by Luxoft Training Center, this year in Kiev. There way some issues, but generally it look like a most interesting PM community event in Ukraine - thanks Luxoft.
There was an assumption that it may be too headhunting-targeted, but it was rather an advvertisement of training center services those are not so imposing.

More info is here: http://www.pm-labs.ru/news/105

So let's go on!

Thursday, June 25, 2009

Azure Cloud over firewall: HTTP protocol incompatibility

Hello there,

Just got a real problem - out corporative Squid firewall does not support HTTP 1.1 properly, and Azure data storage strictly requires it.
As a result, accessing Azure data from local application is not possible at all.
For example, log viewer application are useless.

And of course it is really hard to kick our administrators to change it.

Tuesday, June 23, 2009

Issue with parsing command lines containing path in c#

Hi!
Another strange detail of .NET/C#:
I needed to pass two pathes to c# command line arguments, and wasn't able to control whether they are ended with backslash or not. Really it was a C# post-build tool so arguments were passed by MsBuild. Final command line looked like following:
"C:\My Path\My Program.exe" "C:\First Path\" "C:\Second Path\"
However C# command-line parser treats \" as esacape sequence
so for this sample
args[0]=="C:\\First Path\" "
and args[1]=="C:\Second"
and even args[2]=="Path\"".
Absolutely unacceptable, isn't it?
The only way to solve it I can see is to get the whole original command line from Environment.CommandLine and have your own parser. Please remember that this value includes executable name as well that may be or may be not quoted too.

Some explanation is here:
http://www.eggheadcafe.com/conversation.aspx?messageid=31268633&threadid=31268617

Wednesday, June 03, 2009

Converting Word document to clean HTML

Just got a request to convert our User Manual from Word 2007 to nice HTML format. As you may know Word provides really ugly formatting when exporting to HTML. There is another option named "Filtered HTML" that provides much cleaner one but still not acceptable.
I tried different approached found from Google - exporting and cleaning by Tidy, manual replaces, even using Gmail preview function (send document to GMail account and use preview on site).
Still looks ugly. I did not try DreamWeaver funcion for Word HTMl cleaning yet, maybe found one to try.
If it didn't help - need to copy-paste without formatting and format manually :-(.

Really Format Manual seemed to be the only possible solution - did it finally in Expression Web I had at hand. Funny tool but still missing some important features like formatting copier.

Monday, June 01, 2009

Troubles accessing WCF service on Vista

Got this problem seconf time so need to describe it for future.
(Strange that there are so few comments on it found by Google.
Do any other developers use Vista? Or they know some secret way?
One of useful advises I met was "Get rid of Vista")

So, back to the problem.
I tried to debug by WCF service-based application on Vista
after succesfully running it on Windows XP.
However, it did not work.
First idea was to restart VisualStudio with Administrator permissions that is usual.
But it did not work again and gave smth. "is in Faulted state" error.

Magic words are the command:
netsh http add urlacl url=http://+:9001/ user=DOMAIN\user
Replace URL and user domain/name with your data.

More details are here:
http://stackoverflow.com/questions/598643/hosting-a-wcf-service-in-vista
and here
http://msdn.microsoft.com/en-us/library/ms733768.aspx

By the way, thanks a lot for all the guys from http://stackoverflow.com/. Great job!

(Sidenote. Why is it so complex to request permissions elevation from .NET? I got samples from Microsoft here but it is very unconmmon anyway)

Tuesday, May 26, 2009

My Azure Crawler is quite working now, will publish it soon either if have time to improve or not.
Also, going to try cloud solution from Google and maybe Amazon but it seems last one have no free option, and I haven't internet-enabled card now (another big story)

Wednesday, May 20, 2009

Cloud computing: Microsoft Azure

Recently I had a closer look at Microsoft implementation of cloud computing paradigm: Azure plateform. Despite of issues those are inevitable for pre-release product, it looks really promising and quite developer-friendly.
Hope to show something runnable and presentable soon!

I'll be adding my thoughts here for now, andlater structure them up

0. Use StorageClient helpers from Azure SDK. It'll save you lots of effort

1. When you save data in Table storage - always fill both Partition and Row key, or you'll be unable to delete records. Also remember that keys cannot contain / \ # , ?

2. Select operations to Table storage are limited to 1000 records and is surely limited by 1000 charcters per text field. It brings sound limitations for your data operations. For example, it does not make sence to select all records - instead you should have some filtering field (partition key or smth else) able to divide data to bunches below 1000 items each.

3. Read focumentation or goggle for other workarounds like foreign keys simulation.

Visual Studio Team System 2008 Test Load Agent troubles

Recently we had an idea to test one of sites being developed from multiple client locations - so have a distributed test.
Since I am usually oriented at Microsoft product and moreover I remember old Web Application Stress Tools from Microsoft thst was really good for that time, I believed there should be something for distribute testing in Visual Studio 2008 Team Suite Edition.
Sounds logically? Not for Microsoft!
VSTE does not support distributed testing.
If you really want it so much - you should install separate product: Visual Studio Team System 2008 Test Load Agent
Pricing? Well.. Around $5000 for volume license. No other options.
But! there is a 90-day Trial here: http://www.microsoft.com/downloads/details.aspx?FamilyID=572e1e71-ae6b-4f92-960d-544cabe62162&displaylang=en
Again but! It does not work for me - I have VS 2008 SP1 but trial is compiled against pre-SP1 libraries. Really there are LOTS of reasons it may not work for you at all. Some of them are here: http://weblogs.asp.net/okloeten/archive/2008/09/09/6612870.aspx.
So it seems we'll look for some other product - more friendly and worth its money...

Wednesday, December 03, 2008

How to make InputBox in WSH JavaScript

I was just asked if Windows Shell (WSH) JavaScript has something like Visual Basic InputBox function.
It seems no.
So here is a small .NET utility showing the box and saving value to given environment variable.
See usage sample in *.js file.

http://www.savefile.com/files/1913944 (LET ME KNOW IF THIS SERVICE ISN'T WORKING)

Monday, October 13, 2008

How to unlock locked file in TFS

Just solved a problem.

Imagine some bad guys left your team and did not check in their files.
So you cannot deal with them anymore from Visual Studio.

Here is great explanation of how to rescue:
http://blogs.msdn.com/rimuri/archive/2006/03/06/544686.aspx

Also - description of TFS command-line tools you'll surely need:
http://blogs.msdn.com/buckh/articles/CommandLineSummary.aspx