guaro's Q&A profile
.NET Development C# Asynchronous Socket. How to reject unwanted connection?
Hi all, I am a newbie on C# socket programming. Can anyone teach me how to reject an unwanted connection based on the IP This is my code (it does capture that the IP is not the wanted IP, but then after rejecting this, the main socket won't listen anymore): Socket tempSocket = m_mainSocket.EndAccept(asyn); string cIP = ((IPEndPoint)tempSocket.RemoteEndPoint).Address.ToString(); // I want it to only accept connection from 202.103.212.32 if (cIP != "202.103.212.32") { tempSocket.Close(); Console.WriteLine("Rejected connection from " + cIP); m_mainSocket.BeginAccept(new AsyncCallback ( OnClientConnect ),null); } else { m_workerSocket[m_clientCount] = tempSocket; tempSocket.Close(); } Please help, as I've been ...Show All
Visual Studio Tools for Office Error when trying to install ClickOnce Application
Howdy, I'm trying to install a clickonce application from IIS on my development machine which has .NET 3.0 installed and VS2k5 sp1 installed. When I navigate to the site and click the Install button I get the download dialog and all is well until I select run from the the setup dialog. I then get the error below: The following error occurred attempting to install 'http://luke/ArlTexAjax/AddressBook.application': "Application not found " I have set the MIME types for .application, .manifest and .deploy extensions. As I was working trying to solve this issue I noticed if I clicked on "launch" link on the installation page, the install is accomplished successfully. It seems as though the setup.exe file ca ...Show All
SQL Server Use of Priority Boost in Cluster
Hi, I am running SQL Server 2000 (SP3A) Enterprise on Windows 2000 Cluster, and am currently experiencing performance slowness. Among the many things to be looked at, I want to know particularly whether I can sp_configure the SQL Server priority boost to 1 I read an article from Microsof ( http://support.microsoft.com/kb/319942/ ) that this is not to be done in clusters. I also have read discussions from other DBAs that it may be OK. The cluster is a 2-node cluster, each owns one named instance of SQL Server. And the cluster is dedicated to running SQL Server. Any help will be greatly appreciated. I have personally went "round and round" regarding the priority boost setting and I al ...Show All
Smart Device Development error: An internal error occurred in PlatformVerificationTask which abort project build
I get an 'internal error occurred in PlatformVerificationTask' both error and warring when I build. 1. The project type is a device application for Pocket PC 2003 and is written in C#. (Just create new project then build) 2. I am running VS2005Pro CHT version 8.0.50727.42 (RTM 050727.4200) detail: Microsoft Visual Studio 2005 Version 8.0.50727.42 (RTM.050727-4200) Microsoft .NET Framework Version 2.0.50727 Package: Professional Microsoft Visual Basic 2005 Microsoft Visual C# 2005 Microsoft Visual C++ 2005 3. Project was native VS2005 PPC 2003 C# 4. All I do is create new project then build then got both error and warring. After that. 1) I just uninstall full VS2005 include runtime and tools(also include .NETF 1.1 ...Show All
.NET Development Interface Between .Net 1 and 2
It seems like the answer to this question should be obvious. But I can't seem to find any sort of answer anywhere on the net. Perhaps my search skills are too poor. But if you could help point me in the right direction... I have an existing asp.net 1.1 website. I have a new .net 2 dll. I want the existing website to use the new dll. What is the best way to accomplish this My thoughts... * web service * remoting * rewrite dll in .net 1 * console app that the website can execute via process.start() Any insight, guidance, direction, etc. would be greatly appreciated. John DeHope. Hi, When migrating to .NET 2.0 I use the following approach: 1) If is possible to migrate to 2.0 the main application firs ...Show All
SharePoint Products and Technologies Page Layout
Hi, i have created different page layouts based on the article page layout. But there's one problem which i cannot resolve: when a user creates a new page based on my page layout ..the my new page layout works excellent. But when the page is rendered in the browser it's being displayed totally different then i expected. After lot's of restyling i still cannot seem to get it correct. Are there any tips form which i can build on... Things i need to consider... maybe some first class tips kind regards and many tnx in advance... Joost Hi Joost, can you describe the difference you're seeing when the page is created using the page layout Also, does a page using this same layout look different in the browser to you than to o ...Show All
SQL Server Using a Variable in SSIS - Error - "Command text was not set for the command object.".
Hi All, i am using a OLE DB Source in my dataflow component and want to select rows from the source based on the Name I enter during execution time. I have created two variables, enterName - String packageLevel (will store the name I enter) myVar - String packageLevel. (to store the query) I am assigning this query to the myVar variable, "Select * from db.Users where (UsrName = " + @[User::enterName] + " )" Now in the OLE Db source, I have selected as Sql Command from Variable, and I am getting the variable, enterName,. I select that and when I click on OK am getting this error. Error at Data Flow Task [OLE DB Source [1]]: An OLE DB error has occurred. Error code: 0x80040E0C. An OLE DB record is avail ...Show All
.NET Development Odbc SCHEMA Issue
Hello everyone, This is my issue. For the longest while i've been reasearching and trying to figure out how, when using and ODBC connection, do I get the database schema, withouth having to execute an sql statement first. What exactly i'm trying to do is this - Connect to an odbc database (which I already can), retrieve the list of columns for a specified table - before executing a specific sql statement. Now is there a way this can be done Well, the implementations won't be the same so accessibility will depend upon the driver or provider implementation. For example, file based databases (ISAMs) such as dBase, Paradox or even CSV files usually don't really have the concept of tables. However with respect to OLEDB the databases ar ...Show All
Internet Explorer Development Web Browser with Vb.Net
Hi friends, I am new to VB.Net. I am using VS 2005. I have to call a website, which has 3 frame, after calling the first main mapge, example : index.html (contains 3 frames), i need to open search.html in the "main" frame. How do i do this. Please guide me ... Thanks in advance ! Anuradika hm..even using the example code, it still not showing the pahe.html in the "main" frame, instead its showing as a new window...but the spelled it correctly... any idea on what i shall do.. ...Show All
SQL Server Sysadmin Job owner does not have permissions to run proxy subsystem SSIS
Hi, Description: I've been trying to schedule my package to run as a SQL Server Agent Job on a remote SQL server. I've created credentials with my domain identity . I have sysadmin role on the development server. I've also created a proxy account, with Job owner and assigned sysadmin role. I tried to enter this account to the proxy account properties but since it has sysadmin role it disappears. Problem: When I run the job it fails with (reason: JobOwner .. doesn't have permissions to use proxy 1 for subsystem SSIS) Appreciate a help... Gulden ...Show All
Visual Basic Initialization during load of a class library
Hi all, I'm building a class library in Visual Basic with .Net Framework 2.0. I want to do some initialization when the DLL is loaded. Currently I call my Initialization routine in all Constructors of the classes and in all the shared sub's and function's. Can somebody tell where I can put that code. Is there as something like Me .Startup in a Windows Form or like the OnStart sub in a Windows Services or like a Main Sub in a Console Application Thanks, Bernard Dijkstra DMan1 wrote: For any class the constructor is the "start" routine.... Public Sub New(byval ContrucotrArg as object).... Yes, I know this ofcourse. I need to know how to do some i ...Show All
Visual C# New Editor
Requirement: I want to create an application, which should be able to create a file, with the file extension be specified by me. And, when i double click to open that file, it should open it's content in that application. How can this be achieved ( like word,excel..etc) Code so far: For example.. I have created a application with a Richtextbox control to display data,buttons to create a new file, openfile,savefile and to exit. And let my file extension be ".gun". Time to Answer: Now, what happens is i create new file, save(savefiledialog) it with .gun extension. This files gets opened when i open it using 'open(openfiledialog) button' which is present in my application. But when i double this file (which is placed ...Show All
Windows Forms Moving Control at runtime not working properly
I'm trying to move a button control at run time with the intent of having the control act exactly like moving a button control does in the designer. When I click on the control and attempt to drag it across the form it disappears and then pops up in a different place on the form from where it was dragged to. Can someone please tell me what is wrong with the code public partial class Form1 : Form { private bool dragging = false ; public Form1() { InitializeComponent(); } private void button1_MouseMove( object sender, System.Windows.Forms. MouseEventArgs e) { if (dragging) { button1.Location = new Point (e.X, e.Y); } } private void button1_MouseDown( object sender, Sy ...Show All
Commerce Server Shipping Rates.
We need to display the prices of shipping methods with the name of the method on our UI. Is there a way to handle this We do not want to run pipeline for each shipping method and compute the result and present it to user. Thanks To get the details of the shipping rate method, you will need to get a ShippingMethod using the ShippingMethodManager. The rate details are stored in ShippingMethod.ShippingRates. As mentioned above doing this in a runtime app is not recommended. -David ...Show All
.NET Development retrieving last entry
i have a table ID. so how can i retrieve the ID immediately of the last entry after inserting the data into the table Like if your table is: Table1 Field: IID - identity, not null , int and primary key Name- varchar(50). Then Insert Statement Should be Insert Into Table1 (Name) Values ('LPlate'); SELECT Scope_Identity(); ...Show All
