vsts2008

How do I customise the CREATE DATABASE statement in VSTS DB Edition Deploy?

Hi, I'm using VSTS Database Edition GDR Version 9.1.31024.02 I've got a project where we will be creating multiple databases with identical schema, on the fly, as customers are added to the system. It's one DB per customer. I thought I should be able to use the deploy script to do this. Unfortunately I always get the full filenames spec...

Windows Forms visibility issue

Hello everyone, I am confused about how to make a Form visible. When we create a Windows Forms application, the default Form1 is automatically visible, even without explicit call to Show method. But if we want to show another Form and make it visible, we have to make it visible by calling Show. Any ideas why there is such differences? ...

string escape into XML

Hello everyone, Any C# function which could be used to escape and un-escape a string, which could be used to fill in the content of an XML element? I am using VSTS 2008 + C# + .Net 3.0. EDIT 1: I am concatenating simple and short XML file and I do not use serialization, so I need to explicitly escape XML character by hand, for example...

unhandled exception will make WCF service crash?

Hello everyone, I want to know whether unhandled exception will make WCF service crash. I have written the following program which shows unhandled exception in a thread started by WCF service will make the whole WCF service crash. My question is, I want to confirm whether unhandled exception in threads (started by WCF service) will mak...

why my WCF client gets empty result?

Hello everyone, I am using VSTS 2008 + .Net + C# 3.5 to develop WCF service (self-hosted as a Windows Service). From client side, I am using ChannelFactory to connect to WCF service. My confusion is, when I change client side code from "public string response" to "public string responseAliasName", the value of responseAliasName is null....

play media file error in Silverlight

Hello everyone, I am using Silverlight 2 + VSTS 2008 + C#. And I downloaded source code from the popular sl2videoplayer, http://sl2videoplayer.codeplex.com/ then I build the solution and then using IE to open default.html. But no video is played, here is the error message from IE and screen snapshot from IE. Any ideas what is wrong and ...

open browser error in VSTS2008 for a Silverlight project

Hello everyone, I am using Silverlight 2 + VSTS 2008 + C#. And I downloaded source code from the popular sl2videoplayer, http://sl2videoplayer.codeplex.com/ then I build the solution and then using F5 to debug (IE tries to open default.html). But seems the page cannot be opened, here is the screen snapshot. Any ideas what is wrong? htt...

how to make a Windows Form always display on the top?

Hello everyone, I am using VSTS 2008 + C# + .Net 2.0 to develop a Windows Forms application. In the default Form1 I have a button, and click the button will invoke another Form -- Form2. My question is, I want to make Form2 always on the top, i.e. user must response Form2 (fill in informaiton in Form2 and close it) until the user could...

C# List<T>.ToArray performance is bad?

Hello everyone, I am using VSTS 2008 + .Net 3.5 + C#. I heard the performance of C# List.ToArray is bad since what it does is memory copy for all elements to form a new array. Is that true? thanks in advance, George ...

var keyword in C# 3.0

Possible Duplicate: Whats the point of the var keyword? Hello everyone, I want to confirm whether my understanding is correct. If I do not use LINQ, then the only benefit of using var is to make brevity? Is that correct understanding? thanks in advance, George ...

issues of creating a new Windows Form in C#

Hello everyone, In the button click even handler of Form1, I want to create Form2. Here is my code, even handler of button1 of Form1 // button1 belongs to Form1 private void button1_Click(object sender, EventArgs e) { Form2 form2 = new Form2("www.google.com"); form2.ShowDialog(); } Form2 contructor public Form2 (string str)...

C# Windows Form disappears suddenly!

Hello everyone, I am using C# + VSTS2008 + .Net 2.0 to develop a Windows Forms application. In button1 event handler of Form1, I create Form2, then Form2 appears. Then when trigger event handler of button2 of Form2 (button2 is Form2's UI button element), after executing button2 event handler, Form2 will disappear. Here is part of my cod...

Invalid Operation Exception from C# Process Class

When I use VSTS debugger to see the properties of instance of class Process, many of the properties are marked with InvalidOperationException. Why? Am I doing anything wrong? I am using VSTS 2008 + C# + .Net 2.0 to develop a console application. Here is my code: System.Diagnostics.Process myProcess = new System.Diagnostics.Pro...

Why use a dedicated computer to make builds using TFS?

At the MSDN site, it states: "... install Team Foundation Build on a computer that is dedicated to running builds." OK, I got that. But my manager didn't, and I wasn't able to convince him. This way, I aske the SO community to help me convince him of the need to use a dedicated computer to run builds. ...

SecurityAttribute.Unrestricted issue

Hello everyone, I am confused about this property, as mentioned here, http://msdn.microsoft.com/en-us/library/system.security.permissions.securityattribute.unrestricted.aspx we could give it full or non-full. My confusion is for permission in a straightforward understanding, there should be only two status -- granted and not-granted, w...

Windows Forms class partial public issue

Hello everyone, I am using VSTS 2008 + C# + .Net 2.0 to develop Windows Forms application. I found by default, the new Form we created will be marked as public partial. My concern is whether expose class as public has any security risks? Should we mark it as private? Any impact for functionality if we mark it as private? BTW: I met wi...

Http session issue

Hello everyone, I met with strange session issue. I have developed a web site which uses session to track user specific information to determine whether a specific user has permission to access some part of the web site. I am using VSTS 2008 + .Net 3.5 + C# to develop ASP.Net web site. In my design, when I access http://mysite/sitemana...

http meta refresh issue

Hello everyone, I am using http meta refresh to reflesh current page to keep session live. I am using VSTS 2008 + C# + .Net 3.5 and developing ASP.Net application. My question is, is it possible to send from client (browser) side If-Not-Modified-Since request header to server side and check if at server side responses 304 Not-Modified ...

how to dump response headers in ASP.Net

Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 to develop ASP.Net. I want to dump all response headers returned to client for a specific aspx file. Any ideas how to do this easily? I know how to use Response.Headers collection, but my confusion is where to enumerate to get the accurate response header? For example, if I enumerate...

any ideas to optimize the ASP.Net server load

Hello everyone, I am developing using VSTS 2008 + C# + .Net 3.5 to develop ASP.Net application. At client side, in order to keep session live, I will refresh server for every 5 seconds. Here is my code at client side, server side Default.aspx will do nothing -- for the only purpose to keep client alive. <html> <head> <meta http-equiv="...