haricharan's Q&A profile
Visual Studio 2008 (Pre-release) Trouble loading Baml using LoadComponent
Hello, I'm trying to load some baml from resource assemblies using Application.LoadComponent. As a parameter I use Uri that contains full name of assembly with culture: "en". But LoadComponent gives me IOException, that same assembly, but with culture: "neutral", was not found. here is a sample that first loads PresentationFramework Luna baml, and then tries to load mainwindow.baml from Sparkle. Luna baml is loading as expected, but Sparkle baml throws exception: static readonly string PROGRAMFILES= Environment .GetFolderPath( Environment . SpecialFolder .ProgramFiles); static readonly string PRESENT ...Show All
Visual C# What Pattern/approach suits my application requirements.
Hi all, I have an application scenario that is based on health and safety inspections. So basically, a set of questions and answers. I have a class, Inspections, that contain properties about itself, such as type of inspection, data and time etc, and also a questions and answers collection class to contain both the questions, and answers. Anyway, in my application I need to display these questions (displaying the relevant data controls based on the question types) and gather the answers (which then get written to a database). These set of questions, can be asked against a number of objects (users/buildings - basically whatever a set of quest ...Show All
SQL Server SQL Reporting Services and SiteMinder (SSO product by Netegrity)
I have an ASP.NET 2.0 application that displays reports in Reporting Services 2005 using ReportViewer control. Everything works just fine with Windows Authentication. But my client uses a Single Sign On (SSO) product called SiteMinder by Netegrity and not Windows Authentication. Once I integrate my web application with SiteMinder, the web pages work fine but the reports stop rendering and the progress indicators keeps spinning indefinitely. I even tried impersonation (in web config) without any luck. As soon as I remove SiteMinder ISAPI DLL, the reports start rendering using the account I used for impersonation. I am not sure if I coul ...Show All
Smart Device Development How can I message a numericUpDown control to select all text. Would EM_SETSEL work?
Any advice would be appreciated. Thanks! See your original post for the answer. ...Show All
.NET Development Performance issue in .NET1.1, WaitForSingleObject hog
Hi, I have a serious performance issue with some code saving a config to disk, on .NET 1.1, and the performance profiling I have done so far baffles me. Any pointers to relevant information would be much appreciated. In a nutshell: ~90% of the time is spent in kernel code (WaitForSingleObject, WaitForMultipleObjects). See profile snippet below. The bulk seems to originate from numerous thread starts, which I cannot trace further. The active code itself takes only ~7% The code involves JET DB access, plus writing many text files, zipping it all. I have used DevPartner Community Edition for the profiling on .net 1.1 While it has some quirks ...Show All
.NET Development continue reading byte[]?
bit of a wierd one here :) I am wondering if it is possible to continue reading/filling a byte[] with data after a previous read I am trying to, delibritly, throw an exception (and handled well at the same time). while ( true ) { int lengthData = this .theNetworkStream.Read(someByte, 0, someByte.Length); //the line above will throw an exception if you read data from a stream which the connection was lost to for some premature reason - this is what i want and can handle it while (this.theNetworkStream.DataAvailable) { lengthData+= this.theNetworkStream.Read(someByte, 0, someByte.Length); } } however as you ...Show All
SQL Server How to add/(connect to) database in SQL Server 2005 Express?
Hello, I just downloaded and installed the Visual Web Developer 2005 Express which is part of the new issued Visual Studio 2005 Express. It includes SQL Server 2005 Express, so I also installed it. My problem is I can't connect to the database supported by SQL Server Express. The log in is failed. I hope anyone who is using SQL Server Express can give me a help and tell me what wrong I've done. What I've done are: 1. In the Database Explorer, right-click the Data Connections, I create a new database named "lavender", so it's "lavender.mdf". 2. Then I go to Tools->"connection to database...", (1) then in the pop-up window, I chose the "Dat ...Show All
Visual Studio Team System TF26198: The work item does not exist, or you do not have permission to access it.
hi all. I have been running VSTS at home, but for security ( as in, in case of fire, etc ), I've moved it to my in laws house, put it online using a program called Hamachi, and connected to it over the web. It all seems to work great. I can check out code, I can add work items, but when I try to check code in and view the list of work items, I get the error above. Note: I am logging in as the same user as when the computer was under my desk here, nothing has changed, except the location. I get the same error when trying to view the list of work items. Obviously, I lack permission to view the list suddenly, al ...Show All
Visual Studio 2008 (Pre-release) Windowless controls for web browser?
I work for a company that is building a very sophisticated web distributed application that uses a lot of overlapping components. Most of the app is .asp / thin (meaning it is developed using browser technologies) and that works just fine. However, there are some portions of the app that will require "thicker" technologies to provide the right user experience. I have been struggling to find a way to integrate controls into IE pages such that they play nicely in the browser's z-order. As i'm sure you are aware, windowed controls do not play nicely in this environment. I need to be able to develop controls that will honor the brows ...Show All
.NET Development Saving type object to a file
How do I save a type object to a file and read it in again using c# Of course, like everything in life, that depends. You can use binary serialization to do it: Type theType = typeof ( RectangleF ); IFormatter formatter = new BinaryFormatter (); Stream stream = new FileStream ( @"C:\MyFile.bin" , FileMode .Create, FileAccess .Write, FileShare .None); formatter.Serialize(stream, theType); stream.Close(); stream = new FileStream ( @"C:\MyFile.bin" , FileMode .Open, FileAccess .Read, FileShare .Read); Type theNewType = ( Type )formatter.Deser ...Show All
Windows Forms Sending an Image via web service
Is it possible to convert an image to xml, and send it to a web service cheers. I've done this before. Just convert the image into a binary array and send it as a parameter to a webservice, should work just fine. ...Show All
.NET Development Prepending data in a log file
I can open a file with filemode Append. What I really want is prepend, so the latest records are at the 'top'. Is there an efficient way to do this for log files which may be quite large and updated quite frequently Or is the solution to provide a viewer that displays the data "upside-down" hi paulustrious, well how about doing the reverse create a temp file and insert the latest log, after that append the previous logs, delete/rename the old log and save the temp with the correct log name ...Show All
Windows Forms Reading command line arguments
Hi, How can I receive command line arguments in VB.net I want to recieve the string arguments and based on the argument I want to make certain buttons on my windows form visible or invisible. Thanks, The arguments are also available with the Environment. GetCommandLineArgs method. There's no need to change the Main method this way. ...Show All
Windows Forms How to write a scheduler for Windows (newbie)
Hi - I have a web application, which I want to use to send me email reminders of events. To have this send the emails each day about the events of that day, I need to write a windows application/service, which will query my database and loop until all of the events of that day have had an email sent for them. I've only ever written in asp/asp.net - and have access to write .net 1.1 or .net2 on my server - I've never written windows programs. I have visual studio.net 2003 and visual studio 2005 professional. Can anyone please offer any guidance on where to start - if I write a windows app with a timer, will this tie up my processor o ...Show All
.NET Development WSE attachments over a network?
Hi, I have successfully created web service using WSE that transfer file contents between 2 machines as DIME attachments. Right now, my code is such that, I read a file from the machine where the web service is hosted and likewise receive the DIME attachmetn and write the attached file stream to a new file on the machine where the client side web service is hosted. How can I read/write a file over a network Yes, you just have to ensure that the address point to the machine. i.e. http://mymachine/myservice.asmx instead of http://localhost/myservice.asmx Thanks, Mark Fussell WSE Program Manager ...Show All
