Saturday, May 27, 2006

SQL PROMPT - From Red Gate Software

While I was reading some blogs today I came accross THIS from Scott Mitchell.   SQL Prompt from Red Gate software. It gives you IntelliSense for SQL. Pretty cool stuff. The best part is that it is FREE. Check it out HERE.

Doc

posted on Saturday, May 27, 2006 9:20:01 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
Tuesday, May 23, 2006

I received a question today from one of my readers. (1 of the 10 I guess. LOL ) about VS2005 web projects.

Doc,

    I am trying to add some class code to my website project and it does not seem to want to recognize the namespace that I am using. When I create a namespace in my aspx files I can see them but not in my class files. What am I doing wrong?

This is a common mistake for those who are new to VS2005.  Since you are now able to point to a folder on your drive and bring up a web project without setting up an IIS virtual directory, you need to do things a  bit different. All class files need to be put in a special folder called App_Code. This folder will automatically be compiled at run time. You can use it to store .cs, .vb, xsd, wsdl etc..

The compiler will look to see what extension .cs or .vb your files have and use that languages compiler for C# or VB respectively. The code is then compiled into a single assembly and is made available to the code in your project. This means that you cannot have files of different languages inside this folder.

Or can you...?

By placing a <compilation><codeSubDirectory> set of tags in your web.config. The compiler will create separate assemblies for each folder. Of course, you have to put the files of like type into those folders.

<configuration>
   <system.web>
      <compilation>
         <codeSubDirectories>
           <codeSubDirectory directoryName="/aspnet/code/mySubDir1"/>
           <codeSubDirectory directoryName="/aspnet/code/mySubDir2"/>
           <codeSubDirectory directoryName="/aspnet/code/mySubDir3"/>
         </codeSubDirectories>
      </compilation>
   </system.web>
</configuration>
Hope that helped.
Happy Programming!
Doc
posted on Wednesday, May 24, 2006 1:32:03 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback

Code Monkey @ Code Camp

OK. So most of you know that we put on the "Rock and Roll" Code Camp here in Southern California. The next one is coming up June 24th and 25th in San Diego (http://www.SoCalCodeCamp.org) but the cool thing is that I just got back an email from Jonathan Colton (http://www.jonathancoulton.com) and he is going to make a Code Monkey @ Code Camp version of his shirts that we will giving out at the code camp. Pretty cool stuff. If you have not heard his new code monkey song you have to check it out.  (http://www.jonathancoulton.com/music/thingaweek/CodeMonkey.mp3) You will love it. (It will stop playing about 1/2 way through. You can get the full version on his site for a buck!!  Well worth the price don't you think)

Thanks Jonathan.

posted on Tuesday, May 23, 2006 11:15:04 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
Saturday, May 20, 2006

p>As part of DotNetDoc's new "Ask the Doc" format, we are starting our journey by taking a page from the Zen Master himself Scott Hanselman. We will be walking through his list of questions posted in his, "What Great .NET Developers Ought To Know" post. We will not only try to answer the questions but give each a "deep dive" so that we not only can answer the question, but so that we UNDERSTAND the answer. We will go one question at a time until we reach the end. I hope you enjoy, and thanks Scott for the thought provoking questions.

.Net Ought To Know #2 : What is a Windows Service and how does it's lifecycle differ from a standard EXE?

Whenever a user logs onto a NT flavor machine, they are given a desktop to work with. Any of the programs that are run, any of the processes that are started belong to this user. Only one user can be logged on at one time.

If you go to windows explorer and navigate to the Documents and Settings folder you will see all of the different users that have used your machine. Only one of these profile (or desktops) can be active at a time. Different rights can be given to each of the users of the system which can control what they can see and what they can do. Standard EXE's are run by users that are logged onto the system. This is accomplished by either navigating to the shortcut associated with the application (either on the programs menu or the desktop) and clicking on the icon. This will run that application using the rights of the currently logged on user. You can also run as another user by right-clicking on the icon and selecting run-as from the context menu, but you get the picture. Standard EXE's are associated with the current user and their desktop.

Windows Services, on the other hand, are processes that can exist and run without a user/desktop. The windows service runs in its own windows session without the need for any particular user to be logged onto the system. They are initiated when the system boots up. As opposed to a Standard EXE, they have no user interface as they run in the background of your computer.

 

 

 

 

 

 

 

 

You can view all the Windows Services running on your computer by using the Computer Management Console. This can be opened by clicking on the services icon found in your control panel. Many of the applications found in here will be familiar to you like SQL Server (MSSQLSERVER for 2000 or SQL Server * for 2005) or Task Scheduler, but others will not be, like Network DDE or Logical Disk Manager.

 

 

 

 

 

 

 

To discover what a Windows Service is used for, just click on the service and the description will be shown on the left of the screen. Finally, you can also decide when a service will start. You have three choices :

  • Automatic -
    When this setting is selected, the Windows Service will start when the system is started.
  • Manual -
    When this setting is selected, the Windows Service will not be started until the "Start the Service" link is selected. This can also be automated by an application but the main difference is that it is not started during the system boot up.
  • Disabled -
    Well, this of course means that the service is disabled.

So the lifecycle of a Windows Service is different from the lifecycle of a Standard EXE because a Windows Service is associated with the system (but can use any account) and begins its "life" when the system boots up. A Standard EXE needs a signed on user(manually or programmaticlly)to initiate its instantiation.

Happy Programming.

DotNetDoc

 

posted on Saturday, May 20, 2006 11:26:16 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
Thursday, May 18, 2006

As part of DotNetDoc's new "Ask the Doc" format, we are starting our journey by taking a page from the Zen Master himself Scott Hanselman. We will be walking through his list of questions posted in his, "What Great .NET Developers Ought To Know" post. We will not only try to answer the questions but give each a "deep dive" so that we not only can answer the question, but so that we UNDERSTAND the answer. We will go one question at a time until we reach the end. I hope you enjoy, and thanks Scott for the thought provoking questions.

.Net Ought To Know #1 : Describe the difference between a Thread and a Process?

The power of Windows comes from its ability to multi-task. Multitasking allows the running of multiple processes in memory simultaneously. So first we need to define a "process". In its simplest definition, a process is an instance of a program running in a computer. The Process is the object that owns all of the resources of the application it belongs to.

It is important to remember that a process is NOT an application. In the same way that a class is not an object, an application is not a process. An application is the static code and static data, the process is the code "in-action". Each process runs in its own section of virtual memory. This allows the operating system to keep them separate so that a problem with one process does not bring down the whole system. Inside its own section of Virtual Memory, everything needed to run the application, from the code to the stack and heap, to it's static variables , can be found.

A thread on the other hand is an independent path of execution WITHIN a process (thread of execution) . Threads are very similar to processes in that they both represent a sequence of instructions needing to be executed. When you begin a process a "Start Up" thread is created that will execute your Main() method and continue running until the method has ended. A process can create multiple threads (Multi-Threaded Application) WIHTIN the process to perform tasks. A process can be thought of as a collection of threads. It can have several threads running concurrently giving the allusion that your application is running faster. Remember, your operating systems can only do one thing at a time (Excluding machines with multiple processors of course). So having multiple threads allows your program to continue without having to wait for a particular task to complete.

 

Happy Programming

DotNetDoc

posted on Thursday, May 18, 2006 1:03:35 PM (GMT Daylight Time, UTC+01:00)  #    Comments [1] Trackback
Wednesday, May 17, 2006

The DotNetDoc forums have been hit repeatedly by spammers in the past few months and I just can't seem to get them to go away so I shut them down (That will stop them - lol). But this made me take a look at how this site is set up. I started with many different tabs which contained article downloads, DNN Modifications and modules, course outlines, presentation materials etc....

Well I have decided to change the format of DotNetDoc a bit. I have decided to turn DotNetDoc into a question and answer blog. Throw me anything you want. (Anything .Net that is) and the Doc will answer it here. I will be adding a comment box to the site that will allow you to post your questions to me and will post the answers here.

Now, I thought to myself (self), what if no questions come?  Hmmm that wouldn't be good for the format would it.  Of course not, so I have decided to kick it off by working on something that I have been thinking about for a long time.

Scott Hanselman on his blog Computer Zen (http://www.hanselman.com/blog/) had a post called "What Great .Net Developers Ought To Know (http://tinyurl.com/7mf3r) where he posed a set of questions every .Net Developer should be able to answer.

I have decided to start with these items and answer them one by one. Then as other questions come in, I will work them in between these post. If no questions come in from my 5200 subscribers then oh well. It will be a great exercise.

So Stay tuned, I may be changing the site  a bit too. Nothing too drastic. I will still be using dasBlog for the site, I just might do away with the outer shell. (We will see)

That's it for now.
See you soon with Question #1 : Describe the difference between a Thread and a Process?

Happy Programming.

DotNetDoc

posted on Wednesday, May 17, 2006 11:45:49 AM (GMT Daylight Time, UTC+01:00)  #    Comments [2] Trackback
Saturday, May 06, 2006


Hey All,

    I am starting a new Blog.  ThePatternMan.com . It will be focused solely on Design Patterns. Check it out when you have time.

Well, the first few posts have been about setting up CS but AFTER THAT. Design Patterns.

Doc
posted on Saturday, May 06, 2006 11:58:02 PM (GMT Daylight Time, UTC+01:00)  #    Comments [2] Trackback
Friday, May 05, 2006

It looks like I have a new book out? I didnt even know that I knew anything about political sociology. Hmmmm Go figure.

book.jpg

posted on Saturday, May 06, 2006 12:02:50 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
Wednesday, February 08, 2006

I have been having difficulties getting Team System to work accross a VPN connection.  The problems occur when I try to create a new Team System Project.  After hanging for about 10 minutes, I get the following errors.(below). I can create it locally so that is what I am doing for now. If anyone knows a fix for this (besides permissions because that road has been traveled) let me know. I will post when I get a fix.

Doc

Error
TF30224: Failed to retrieve projects from the report server. Please check that the Yukon Reporting Web and NT services are running and you have sufficient privileges for creating a project.

 

Explanation
The Project Creation Wizard encountered a problem while creating reports on the SQL Reporting Services on http://TeamFoundation:8080. The reason for the failure cannot be determined at this time. Because the operation failed, the wizard was not able to complete creating the SQL Reporting Services site.

 

User Action
Contact the administrator for the SQL Reporting Services on http://TeamFoundation:8080 to confirm that the SQL Reporting Services server is running and you have sufficient privileges to create a project . Your user account on SQL Reporting Services must have Content Manager permission to create a new project. Also, you might find additional helpful information in the project creation log. The log shows each action taken by the wizard at the time of the failure and may include additional details about the error.

posted on Wednesday, February 08, 2006 5:04:28 AM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback