.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani
Post New Web Links

Is it possible to determine at runtime when my site is running in the debugger?

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :ASP.Net

Is it possible to determine at runtime when my site is running in the debugger?

I want to use one setting for production and another when I'm running in the debugger.

View Complete Post

More Related Resource Links

Workflow Runtime and Long Running Processes

I am trying to get a handle on the fact that applications have to manage the persistance of workflows directly. in 4.0.  If I set a workflow to run every night at 3:00 AM and then be persisted, how will I know that my application will be awake and ready to do the job.  I know that SharePoint currently uses a timer on the server which fires off every 5 minutes (default). 

Is it possible to show on a site whether a service is running?

I am trying to have a marker show whether or not a particular service within the services.msc is running on a remote server(s). I have a service called Yardi Services on a virtual server.  I want to be able to show on a dashboard I am creating for work, whether this service in running or stopped.  For some reason this service will randomly stop though I have a auto restart on error.  It is really confusing and so I want to be able to know when it stops so I can restart it.       I have not been able to find anything online to support this.  I am assuming that I would need to create a web service or use WMI?  I am new to this stuff and could use some help or direction.  

How would runtime determine which assembly to load?

Hi , How would runtime behave, if I have an assembly with same version number in two different folders on my machine? How to restrict the runtime to read from bin folder only for my specific assembly?        

Running code after site definition site creation in a event receiver or feature receiver

Hi guys I've got a site definition which is pretty much based on STS.This is it's own sharepoint project. Let's call this project SiteDefProj. Next in another SharePoint project (same solution though). Let's call this CustomListProject. In this project I've got a feature which provisions a bunch of lists based on custom content types - this feature is a site scoped. Let's call this feature: CustomListInstances. I have added a feature receiver to this feature to execute some custom code on the lists themselves (under feature activated) In my ONET.XML (part of the SiteDefProj) I have CustomListInstances feature ID as part of my <sitefeatures>. When I do a create site I can actually step through the code and see it actually being executed but after the site is created the list instances are created but it's like the code never run or did anything. The weird part is that stepping through the code while creating a site collection using my SiteDefProj the code runs great with no errors. All lists are there and the code runs smooth. If I manually create a STS site and activate my feature everything works and the code does actually run and the effects are visible after the feature is created. Again I can actually step through it in debug. My suspicion is that there's some sort of a race condition in the CREATE SITE functionality where maybe the web or site collection hol

Help with running Asp.net site



I am a PHP developer and have been asked to make some slight amendments to an ASP.net site.  Im pretty confident I can make these amendments but the biggest challenge seems to be getting the actual site up and running on my own server!

I have a had lots of errors with regards to the paths to files, as the website is linked absolutley to the root folder and on my development server I cannot have the files at the root.  I have therefore worked my way through some of the files making the paths relative so I can at least see some of the site running but then I came accross this error:

CS0103: The name 'Data' does not exist in the current context
Line 5:    protected void Page_Load(object sender, EventArgs args)
Line 6:    {
Line 7:      rptNews.DataSource = Data.NewsArticle.GetLatestNews(3);
Line 8:      rptNews.DataBind();
Line 9:    } 
I assume this is something to do with data being called from a database.  If so, can someone help me on how to get the site and database up and running as I

Can a stored procedure programmatically determine if an SSIS package is running?



If I have the 'ExecutionInstanceGUID' value for an SSIS package that I know was started, is there a way that a stored procedure can programmatically determine whether the SSIS package still is running?

Thanks -



visual studio 2010 pro web site running problem


hi friends.

i seted up visual studio 2010 to my pc before 2 mounts and i did not have any problem. after i formated my pc vs2010 not running web site projects. sortly when i run it on internet explorer open but its cant open project. its like there is no any websites, what is problem.

thanks all. 

How to merge images runtime like this reference site



I have a requirement of achieving something like this site


When user select one particular image and apply change that should reflect in particular portion of the image.

For example when user select one picture of dinning room and ally different color of the wall. User selects different flooring type and that changes should be applied to the selected image.

Please help me out as soon as possible 

I have backups of the SQL dbs but that's it. How can I get the site running again?


I have a client who has been backing up their WSS3.0SP2 site using a SQL backup utility. The server their site runs on crashed and is unrecoverable so all I have are the sharepoint DB files. (WSS_CONTENT, ADMIN-CONFIG, etc).

Can someone point me in the right direction on how to connect these DB files to a new sharepoint server and get it running again?



Teenage angst has paid of well, now I'm bored and old.

This web site must be created on a server that is running Microsoft Sharepoint Foundation. Please ch


Hi all, I installed microsoft sharepoint designer 2010. It was working perfectly up until yesterday when I create a new site, it gave me an error that said " This web site must be created on a server that is running Microsoft Sharepoint Foundation. Please choose another Location " Now I can't create any sharepoint site and it freaks me out. I tried repairing, unistalling and reinstalling but still i get the same message. 

How to determine HttpRunTime.Cache runtime size


Hi guys,

How do we get/measure the memory consumption of the cache in System.Web.HttpRunTime.Cache class in c#. I need to know the size of the cache at a certain interval in order to flush the cache to prevent cache from hogging too many resources. I understand there's absoluteExpiration, slidingExpiration, cacheDependencies but those doesn't fit into my use case.

Thanks in forward,

Running a feature activated code during new site provisioning.

I would like to be able to run some simple code that have in a feature whenever a new site is provisioned.  I created the feature and it works just like I want it to.  I left it activated and saved the site template.  Now when I create a new site based on the saved site template the feature activated code no longer runs unless I deactivate and then activate.  I know this isn't suppose to work this way, and after much searching on the internet I am finding the feature stapling (not what I want, that seems to be what I have already done) and SPWebProvisionProvider.  The provider might be what I want but I am not sure how it works and there are no good examples on how to get one created in code and where to place it so that a user can utilize it when creating a new site.  Can someone explain this concept to me in ad nauseum detail.  Thanks in advance.

Basic problem running dlls via a web site.


Look at this thread : http://forums.asp.net/p/1616087/4138373.aspx#4138373

I have asked some colleague about that problem.

Some said that this is related to Windows 7 security issues, which might be a issue by itself.

I have Windows 7 (Home premium edition), and trying to add some dlls for use.

I have looked at the internet and found the issue : "Security Compliance Manager" : http://technet.microsoft.com/en-us/library/ee712767.aspx

Does this issue related to solving the problem, I have put on thread 4138373 ?


I need basic guidlines, what may be the problem, and how can I solve it.

Also, if I put my code on hosting site, what should I asked them, in order to solve the problem.

Even simple sample that works would be great, please.


Thanks Smile

Issues while running web site created with WebMatrix



Recently I downloaded WebMatrix using Microsoft Web Platform installer on my Windows 7 (32 bit).

The installation went fine and I choose ASP.NET Web Matrix as the web server during installation.

After the installation was completed, I created a new site and viewed it in browswer but my IE8 did not show the page, instead it was showing "Diagnose Connection problem" screen.

When I viewed the site in VWD 2010 by clicking "Launch VWD 2010" button, the site opened in VWD2010 and run properly.

I could not figure out what is the issue. Can any one please help me in this? 

cannot access sharepoint site through Internet Explorer 8 on a machine running Win XP Service Pack 3


The Sharepoint portal can be accessed fine through Firefox. Opera allows me to access it, but I cannot sign out, check out a shared document or do anything which opens a small window on clicking an option.

I can stay with Firefox, but when I try to edit a shared Word document in Word I get the message "Edit document requires a Windows Sharepoint Services compatible application and Microsoft Internet Explorer 6.0 or greater" We need to edit a shared document/calendar which is uploaded. All I know is we are using Sharepoint 2007 and the version of our site is Does that mean we have Windows Sharepoint Services SP2 on our Sharepoint server?

When I try Internet Explorer, I cannot log on at all. I get a window which asks for my credentials which I enter, it fails to authenticate me, then shows me the You are not authorized to view this page message. I tried with different computers, but cannot get in using Internet explorer.

What could be the issue?

Our Sharepoint admin does not have time to look into such matters so I am on my own.

Any suggestions would be appreciated.

Runtime error when open sharepoint site



I have problems. Could you help me out, please !

I set up my environment like this.

I'm running Windows XP Pro SP3 as client.

I used Microsoft Virtual Machine to install Windows Server 2003 sp2 and install MOSS 2007 on it as server.

I configured my server have two network adapter(my network card, and Microsoft loopback adapter)


Everything worked fine for the last couple of weeks until yesterday, when I enter Central Administration site on server, or normal site on client, it gave me an runtime error without any details of what went wrong.

Here is the error:


I tried to change the customError mode to 3 available value(on, off, remoteonly) in web.config file, but still the same.

I searched the web and none of them helped. Hope you guys help me with this.

And sometimes it gave me this error


Thank you in advance

Running ASP.Net (VS2008/C#) Web Site Without IIS


I have developed a web site that works quite well and uses MySQL for the data source. It was requested that this be made available for use without an internet connection. Not a problem, I moved it over to Access data source and made a few tweaks to the code. It runs fine again in VS2008. The problem comes when I try to execute it on the destination computer - no IIS.

I have followed the UltiDev Cassini instructions but do not have the MSM file on my system (Win7) and I don't really know what else to try. Is there a better option for a VS2008 developed site?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend