Pranav Shah's Q&A profile
Visual Studio Tools for Office strange vsto security issue
I have a strange security issue using asp.net 2.0 and vsto. I have a web form that launches an excel file with .net code in it. This requires certain .net security settings to be set. The site is at http://localhost/app . So we set FullTrust for http://localhost/app/ *. This does not work however and throws the following exception: Request for permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,Culture=neutral,publickeytoken=blahhh' failed. The security exception is throw when the app tries to access the following http request: GET /pki/crl/products/CodeSignPCA.crl HTTP/1.1 Accept: */* User- ...Show All
Visual C# How to Set columns width in a Win. Form Datagrid at runtime?
Thanks for the help. I figured out how to make certain columns to be readonly. But I had to do this to the DataTable before its even binded to the dataGrid. Is there a better way to do this Also is there a way to set the width of each column I looked at the code above. But I think were using differnt types of datasource. Im a newby with C# so excuse me if my questions seem kinda stupid...... Im not sure how to make the code you posted above to work favorable in mly situation. Are you binding your dataGrid to a datatable like me or some other type of datasource Below is my Code. Bascially its a simple windows form that ask the user to se ...Show All
.NET Development How to choose? ado.net api or object spaces
Hello, I have just read these article, an excellent one in how to make the layers. http://www.15seconds.com/issue/040112.htm There are many ways, object spaces, use objectdatasource with strongly typed business entities, you can also do somethings with the dataset designer. I just don know which one to chooese for my specific project! Any guidelines in how Should I choose my layered arquitecture. Thanks ...Show All
.NET Development Router's public ip address
Greetings All, I have a windows application that is installed at numerours client locations . I want to detect the router's public ip address. Anyone know of a quick and easy way to do this programmatically Thanks, Anz Likely, the router will be the default gateway. You can get the gateway addresses via: public static void DisplayGatewayAddresses() { Console.WriteLine("Gateways"); NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces(); foreach (NetworkInterface adapter in adapters) { IPInterfaceProperties adapterProperties = adapter.GetIPPro ...Show All
Windows Forms TabControl and Menu color settings question
this is more of a .NET graphics thing, but I can't find any good forum in the .NET section so since I'm using C#, this is where I'm asking. The menu items in and containers don't have a .BackGround or .ForeGround property, is it possible to change their colors Also, I changed the .BackGround and .ForeGround on a TabControl and it did not change the color (should have changed something to Cyan I'd think), I changed the pages as well, and those changed the page color, however the tabs are still a color I don't want (I had System.Drawing.Color.Cyan assigned to the form's this.window_background_color, and I assigned this.window.backgroundcolo ...Show All
Visual Basic Visual Basic 2005 "binding" error in every Project
I recently purchased Visual Studio 2005 Upgrade. Every new project I create, and every project I've created in VB.Net 2003, I receive the error "Error while trying to run project. Unable to start debugging. The binding handle is invalid". I don't understand why this development environment won't allow me to run anything. I'm a current user of VB.Net 2003 Standard Edition which qualifies as an previous version that I should qualify me for the VS.Net 2005 Standard (Upgrade) edition. The URL from the MS site indicates this: http://msdn.microsoft.com/vstudio/howtobuy/renewal/#standard Other than suspecting this upgrade version may ...Show All
.NET Development Web Services .net framework 2 over SSL
I have just ported an ASP.NET 1.1 application to framework version 2 and i have a problem. I used to use the following code in framework 1.1. // // workaround to make the webservice call work over ssl // System.Net. ServicePointManager .CertificatePolicy = new WebServicePolicyHelper (); MyWebService ws = new MyWebService (); result = ws.MyMethod(params...); When I compile the program in framework Version 2, it tells me that 'CertificatePolicy' is obsolete and tells me to use 'ServerCertificateValidationCallback' instead. I can't find any help on how to use this class. Has anybody used this Any help will ...Show All
.NET Development Need to find error's origin
Hey everyone, I have a .net 1.1 app that is trying to send a Webdav request to an exchange server to create an appointment. This part works ok on my local domain. However, when I put my app on another domain I get a 502 Bad Gateway Error. (the full error is listed below) I dont know where in the network this error comes from, or how to fix it. Any help is greatly appreciated, but I really really need this fixed asap. Thanks again Error: The underlying connection was closed: Unable to connect to the remote server. System.Net.WebException: The remote server returned an error: (502) Bad Gateway. at System.Net.HttpWebRequest.CheckFinalStat ...Show All
SQL Server Inconsistent package failures
I'm debugging my first SSIS package and is getting inconsistent results. The package does not always complete successfully. When the package does fail, it fails at different tasks that accquire database connections. Any of the following error message would show up: [Execute SQL Task] Error: Failed to acquire connection "FORGE.FMC". Connection may not be configured correctly or you may not have the right permissions on this connection. [OLE DB Destination [6374]] Error: The AcquireConnection method call to the connection manager "FORGE.FMC" failed with error code 0xC0202009. [Connection manager "F ...Show All
Visual C# How to set the timeout for a particular session variable ?
Hi, I'm a c# developer.I was dealing with a project based on session.Suddenly I had doubt of setting the timeout for a particular session variable ie,Suppose I Have, session["A"],session["B"],session["C"],session["D"] etc as the sessions used in my project. My Concern is, Can i Individually set the timeout for session["A"],session["B"], etc. I tried using, sesson.timeout (); it's for the entire page. setting the timeout in web.config is also for the entire project. Help me please. Thanks In Advance. No. Session timeout is for the entire sessio ...Show All
.NET Development Error in JIT Compiler
hi I developed an application in Vb.net and i copied the exe file and pasted it in the desktop and executed the exe an error is generated "JIT Debugging Component Registration is incorrect" can any one help me how to over come this error muthu ...Show All
Smart Device Development Console application in 'Running Programs' control panel?
Hi, When I create a Forms application for Compact Framework, it appears in the Settings->Memory->Running Programs control panel. However, when I create a console application, it does not. Is there a way I can 'register' my application in this way, to indicate if it is still running, and if needed, to kill it Thanks Ilya. I thought it has something to do with having a Form. (You can't really 'switch' to an invisible application!) ...Show All
Windows Forms Adding a Control to set the Hour, Minute and Seconds in a WinForm
Hi how can I Add a Control to set the Hour, Minute and Seconds in a WinForm Thanks Thank you for your help but I need something else, with the CustomFormat property I set HH:mm:ss, this show the time like 03:52:12 but I want to view it like 03:52:12 PM or AM . How Can I do this Thank you once again. ...Show All
Windows Forms Prompt for reboot with installation project
Hi, I have built an installation project in VS2003 (VB) and set environment variables and other things that require a reboot for the changes to take effect. The question is: How do I get my installation project to prompt for a reboot after the installation has completed Any ideas Thanks, Matt In the world of ClickOnce non-impactful deployments reboot after installing a ClickOnce App is a BIG NO NO. A clickonce app should never need a reboot however if I can give you a very silly idea (for fun).. here is what it could be Based on a user reg-key or some thing for the app Detect regkey is not there when the applic ...Show All
Visual Studio GetMarkerCommandInfo in HTML Editor
I have a text marker that is implementing a marker context menu by implementing GetMarkerCommandInfo. This works great in ever text editor except the HTML editor, where it never gets called. Is this simply not supported, or are there additional marker registrations needed to have the HTML editor participate Will, It looks like what is going on here is that the HTML editor defines their own context menu and doesn't include the the marker commands on their context menu. So QueryService never gets called, which in turn doesn't call GetMarkerCommandInfo on your client. You'll need to customize the HTML e ...Show All
