yuchuan's Q&A profile
.NET Development Serialization error with SqlConnection variable
I'm getting a serialization error in ASP.NET when it tries to store one of my classes in the Session state. I marked the SqlConnection variable as non-serializable but it still tries to store it in the session state. My class looks like this: [Serializable] public class SqlServerDAL { [XmlIgnoreAttribute] private SqlConnection Connection; } Any ideas why this is happening even though I marked it with the XmlIgnoreAttribute Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'C ...Show All
Visual C# Accessing a public item through an interface
Hi, Hopefully somone can point me in the right direction on this.. I have an application that has to be able to handle multiple file types, so im using an interface to access the created object. So i have class1 and class2 and they both implement my interface, at loadtime the app creates one of these objects depending on the format. Everything about this works fine, but each of these classes have an array of public items and my question is: Is it possible to access these public items through the interface eg: myObject.items[4] In case its not clear what im trying to do i made a sample app with the exact same structure: http://www.turnipfan.com/sample_code.rar Thanks for any help, -Dave ...Show All
Windows Forms GridView and always visible headers
I have a gridview that has many rows, it's a fixed size and will scroll vertically when the number of entries are too large for the area allotted to it. Is there a way to force the headers to remain at the top regardless of how far down the view you scroll The only other solution I can think of is putting my own labels in, but then I lose the sorting features . Thanks in advance. This is VS 2005 final release and it is a DataGridView control, correct If I start a windows app, add a DGV control, define two columns, and populate (unbound) with enough rows to scroll, the column headers by default stay at the top of the grid as I scroll the rows up and down Is this not happening ...Show All
Visual Studio Team System Major Modifications of Task.xml cause project creation failure. (process template is uploaded without errors)
I am beginning to think that there are limits to the extent that the task.xml WORKITEM can be modified; I am guessing the problem resides in the generic tasks that TFS places in your "todo" list at the creation of your project. There seems to be no way to turn off the creation of these assignments when you create your project. My experience is that I can modify Task quite a bit; but as soon as I make too many modifications to the <TRANSITIONS> I will get an Exception (see below). I can even cut and paste from "Bug.xml" all my states and transitions that work just fine in Bug, but fail when imported into Task.xml. Additionally I have found that if I try to make my own field (MPRI.Common.EstimatedHours) requi ...Show All
SQL Server Create a calculated member on one measure.
I have a Version dimension which is used to break out the Net measure by 'Actual' or 'Budget'. Net is the only measure I'm using. By not using the Version dimsion. The net is incorrectly totaled by both values. Both are not used together. 'Actual' and 'Budget' are the only two members of the Version dimension. I want to add a third member which subtracts 'Budget' Net measure from the 'Actual' Net measure and call it variance. A caculated measure isn't working for me because obviously subtracting Actual - Budget doesn't work so well. Can anyone help me with that OK I got it to the point where there are no errors, but the Variance member will still not show up in the Version dimension. WHat could be the cause /* The CALCUL ...Show All
Visual Studio Express Editions Another Question DMan1
hey, does ny1 no how i can upload .swf onto visual basic. When i place the object "Shockwave Flash Object" onto the form.. an error comes up saying "Failed to import the ActiveX control. Please ensure it is properly registered" i then re-registered it properly in a way some1 told me to, but still the problem is on!!!! can ny1 help me plz.....as soon as possible!!!! thn alot dude :) but not its 5.36pm here, around what time are you talking about that you will be home around So i know when to come on, just in case I had trouble with your responses, so I can respond back to you while you are infront of your machine. ...Show All
Software Development for Windows Vista Microsoft XPS Document Writer for XP
Is there a version of MXDW available which can be installed on Windows XP Thanks, Adran Adrian, The Microsoft XPS Document Writer (MXDW) is actually only available as part of Windows Vista Beta 2 for now. Previous CTP releases from late 2005 and early 2006 did include an older version of the MXDW in the then codenamed "WinFX" SDK. We are working to make this available as part of .NET Framework 3.0 for the RC1 release for downlevel OS. Thanks. -Daniel (Microsoft) ...Show All
.NET Development how to NOT match text in tag
Hi all, Here is a tricky question for regular expression. I want to match some words, say "red" in text body only, but NOT in tags; e.g., "<font color="red">this is red, test red 123</font>" I only want to grep "red" from "this is red, test red", but NOT in "<font color="red">". Nor can I remove tags before or after the match. Thanks, Ning Sergei, you're right, it must be an '*', not a '+'. But I still think that the positive look-ahead is a good choice. HTML will always begin with '< xml', '<!DOCTYPE' or '<html', so you'll always have a tag at the beginning that ends with '>'. -- Regar ...Show All
Visual Studio Team System FxCop run "Out of Memory"
Hi all, when running FxCop on a Assembly sized over 8 MB, FxCop run "Out of Memory". Any ideas out there Thanks! Hubertus I have discussed this with my colleagues. Unfortunately, there is no possibility - it is too much is business logic in the assembly. ISorry, but many thanks for your support Regards Hubertus ...Show All
SQL Server A question about sqlxml
Who use sqlxml .net How can I write code like this: select count(1) as count from Orders for xml auto That's error. And what is the correct sqlxml code Tks. Hi, the code works fine with SQL2005 but fails on SQL2K Eralper http://www.kodyaz.com ...Show All
Visual Studio Express Editions VC++ 2005 build error at CMD start up it says MSVCP80D.dll was not found and said to reinstall Visual After I reinstall same...
VC++ 2005 build error at CMD start up it says MSVCP80D.dll was not found and said to reinstall Visual After I reinstall same error occured. How to fix it or get the dll and put it where it belongs. I have exactly the same problem. In my case it goes through if I have just restarted my computor. Then it works fine. Lets say you want to open a win32 console application. Try to change the _tmain to main by deleting the "_t" from it before you compile. I find that it works after that even if you change it back. ...Show All
Visual C# Dynamic Code Generation
I was just wondering if it was possible to take a string that contains C# code and compile and use it at runtime. For example if I had a string like this: String strCode = @" class SomeClass : SomeBaseClass { private string firstName; private string lastName; public SomeClass() { this.firstName = ""John""; this.lastName = ""Smith""; } ... Properties ... }" ; I have been reading about the CSharpCodeProvider class, however it doesn't look like you can just compile a string containing code. Sure you can; use CSharpCodeProvider.CompileAssemblyFromSource() Regards, Chris ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Retrieving effects and textures
Assuming that I have a model in 3DS Max that I export into a FBX file, which goes through the content pipeline, and is then loaded into the runtime as a Model, how do I go about getting the 3DS texture and effects bindings from my C# code Looking at the Model class all I can see hanging off it is an Effect class, but no texture references - are the textures supposed to be embedded in the effect files If so, how should I set the effects in 3DS so that they are imported via the content pipeline Sorry if there is an obvious answer to this, but I'm more used to dealing with pure HLSL/ASM files rather than effects files.. Andy. Looks to me like I would prefer to use an X file exporter (the current fbx ...Show All
.NET Development Adding new Data Source Problem - happens with VStudio (C#) and Express (C#)
Hello- I am receiving the same error message within Visual C# Express Edition as well as Visual Studio 2005 when I attempt to add a new data source in my project. The error I keep recieving in both Visual C# Express and Visual Studio is "An error occured while creating the new data source: Could not get the type information for 'Lesson09.Database1DataSet' ". Why is that and what does that mean I cannot proceed with my lessons because I cannot get past this point to participate. I have also tried opening a sample project which uses the same techniques and also recieved errors while loading it into Visual Studio as well as C# Express Edition. I get the following build errors: 1- Error 1 Source file ...Show All
Visual Studio Team System Help needed: custom report showing estimated and actual work time for all Team Projects
My manager asked me to create a report that shows information about 5 Team Projects based on the Scrum Process Template. He wants a report that he can draw each month. How assuming that all the sprints for the projects start on the first of the month and last till the last day of the month. He wants this information: Column A: Name of the Project Column B: Estimated Effort for the sprint Column C: Actual time worked on the project during the sprint E.g.: Project A --- 35 --- 42 Project B --- 40 --- 37 Project C --- 65 --- 67 Project D --- 120 --- 132 Project E --- 74 --- 56 I have absolutely no idea on how to create a custom report and I dont even know where to start and where to retrieve the data from so I need some leads to get me sta ...Show All
