Monday, April 28, 2008

Could not start the on Local Computer. Error 1067: The process terminated unexpectedly

Could not start the on Local Computer. Error 1067: The process terminated unexpectedly


Just see if all the binaries of the services are built out to the service location.If not,build and copy and try starting the service.

If the above does not work try uninstalling and resinstalling the service.

Tuesday, March 18, 2008

Calling an exe from a web service

Run the web service under an app pool which would run under and domain account having Admin privileges on that machine.

Make that exe accessible to "Everyone" on that machine.

Monday, March 17, 2008

MOSS 2007- Central SharePoint Admin website error - You are not authorized to access this website.. HTTP Error 401 - Unauthorized: Access is denied

· When you access the Central SharePoint Administration(CSA), you get an error like “You are not authorized to access this website.. HTTP Error 401 - Unauthorized: Access is denied due to invalid credentials”
Chances are that you had configured the SharePoint server by issuing the following command:-
psconfig –cmd setup
and that usually gives a warning for the configuration would happen using Kerberos authentication. The above said error is due to Kerberos authentication.
We need to configure the CSA site to use NTLM authentication by issuing the following command on 12 hive\bin folder:-
stsadm -o authentication -url http://urlofthewebapplication -type windows -exclusivelyusentlm

Thursday, November 1, 2007

How to simulate a deadlock for testing purposes?

How to simulate a deadlock for testing purposes?
In Query Analyzer, run the following statements first:
CREATE TABLE t1 (i int)CREATE TABLE t2 (i int)
INSERT t1 SELECT 1INSERT t2 SELECT 9
Open a new window (say Window1) in Query Analyzer, paste the following SQL statements:
BEGIN TRANUPDATE t1 SET i = 11 WHERE i = 1WAITFOR DELAY '00:00:20'UPDATE t2 SET i = 99 WHERE i = 9COMMIT
Open another window (say Window2) in Query Analyzer and paste the following code:
BEGIN TRANUPDATE t2 SET i = 99 WHERE i = 9WAITFOR DELAY '00:00:20'UPDATE t1 SET i = 11 WHERE i = 1COMMIT
Now run the code from Window1, followed by Window2 simultaneously. Briefly after 20 seconds, one of the windows will experience a dead lock!

Thursday, October 18, 2007

Working with queries across databases

When looking to make a cross database query, there are a few options। The most basic method s the fully qualify your table access with the name of the table। In this case, I could access the Subscriber table from the Orders database as follows:

select * from Subscription.dbo.subscriber


I didn't choose this technique, mainly because of the linked server issue. If I were to move this database to it's own server, which could happen if either of these databases or the load on the server grew, then any process that accessed this table would require recording. Not that I'm against the work, but it's easy to miss a function or stored procedure somehow when moving databases. I much prefer to centralize my code changes as much as it makes sense.
For that reason, I chose another method of accessing the table. I created a view, which I could have called subscriber so the access is transparent. However since I like to be aware of when I'm accessing a view, I named it as follows:create view vSubscriber
as
select first
, last
, startdate
, enddate
, subscriberid
, email
from subscription.dbo.subscriber
In this way I can develop all code in the Orders database just as if the subscriber or any other table were local. If I move the subscriber database (more likely) or rename it (unlikely), then I only have to change the code in one place: the view.

Tuesday, September 11, 2007

App_Web_g-_xrs2k, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified

Look out which class/aspx.cs file it is giving error.We just gotta get that code to recompile.We can do that by just adding a space in the file somewhere and saving.
the only bad thing about doing that is by default, asp.net applications will restart after like 20 or so dynamic recompiles like that