Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

Snowblind37

@Snowblind37
About
Posts
13
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Need help using an abstract WebMethod
    S Snowblind37

    You are right Senthil! It is the actual implementation of the WebMethod. This is where I got stumped. It turned out that when I ran my wsdl.exe I specified "server". This gave me the server implementaion of the class which was an abstract class. So on the server side there is an AccountsImpl that implements the abstract method QueryProfile(). This is the class that would do all the work for my call to QueryProfile(). But on the client side all I wanted/needed to do was create a ServiceAccounts object. So when I ran the wsdl.exe without specifying "server" (default is "client") I was given a ServiceAccounts class that was not abstract. The problem then was that I had obtained (through wsdl.exe) the server implementation when I really needed the client implementation. A valuable lesson was learned......and the best part is I still have some hair left, I didn't throw my computer out the window, I petted the neighbour's cat instead of stomping on it and my car is still in the driveway. Regards, Reserving CodeBlind For The Future..............

    C# help wcf security question workspace

  • Need help using an abstract WebMethod
    S Snowblind37

    You guys are not going to believe this! When I ran my wsdl.exe I used the server option when I really wanted the client version. It all makes sense now. I had been trying to look from the other side of an abstract class and could not find a way to make it work. And for good reason because an abstract class is designed to give you ways to implement methods with the same name but with different logic......Not to implement a method to use an abstract method to use varying implementations of a method Talk about a trip outside the box. I will learn from now on to always take a walk around the box before I bang my head on the inside. Feeling slightly less CodeBlind today. Happy Coding All!!!!

    C# help wcf security question workspace

  • Need help using an abstract WebMethod
    S Snowblind37

    I already am creating the AccountsImpl instance. But the AccountImpl.QueryProfile() still needs to return a value that will come from the webMethod QueryProfile(). This is a main part of the complication.

    C# help wcf security question workspace

  • Move data between forms
    S Snowblind37

    You would not be able to call a static variable from another form as it would have been unique to the object form that you had running earlier. If you need to save information accross instances of your program try saving the information to a file. You can set and get information as you need and it will last until you decide to erase it. Of course, you need to write methods to write and retrieve info, no easy way out. But it will be worth it. CodeBlind

    C# database security question

  • MDI child can't close itself
    S Snowblind37

    Excellent!!! I'm glad to hear that you got it going. As to why this may have been happening? Your timer was probably using most of the processor time as well as being the focus of your program running time. Setting that flag was a way of making your program do something else. I suggest that you create a new thread for your timer and make sure it sleeps, then awakes at certain intervals. Code On and Good Luck!!! CodeBlind

    C# com debugging tools performance question

  • In first time I draw, in the second, no.
    S Snowblind37

    I wonder if you need to refresh your connection after sending the first value stream. Or possibly re-set the object you are sending out. I have had problems before trying to re-send the same object that eventually gets corrupted. Hmmm, sorry no concrete answers but I suppose some possibilties to look at.

    C# graphics help question sysadmin learning

  • Need help using an abstract WebMethod
    S Snowblind37

    I would love to modify the class to make it easier for me. The point is that this is the way it is and will be for other people that access this service(others have been able to do this successfully). My job is to find a way to do this easily and document the procedure. There has to be a way. Definately CodeBlind37

    C# help wcf security question workspace

  • Removing selected text from a string
    S Snowblind37

    When the iterator reaches the end it sets itself at -1. You need to re-set it at 0 after each string that you are finished with

    C# help question

  • MDI child can't close itself
    S Snowblind37

    A few things come to mind........ -What other signal flow might be trying to run? I would find this out before anything. Do you have an infinate loop going on somewhere? A reference to a method that is waiting for information? - The NullReferenceException is likely because it hasn't reached the OnClosing handler - Does the code even reach your this.Close(). Try printing out an "I'm here" before the Close and see if it is even getting that far - Not a bad idea to print out statements all the way through the flow and see where it crashes Hope that helps CodeBlind37

    C# com debugging tools performance question

  • List definition in C#
    S Snowblind37

    There is no List definition in C#. I suggest you go to http://msdn.microsoft.com/ . There you will be able to find the definitions of all the classes available. They are mostly the same for C# and VB, etc. Actual class names will differ from Java but the functionality will be more or less the same. CodeBlind37

    C# csharp

  • DataGrid---UpdateCommand... problem...
    S Snowblind37

    The answer is a little more complicated than it should be....Or at least I thought it should be. The following code is meant to take the value of the cell (that the user has selected and changed)and write this value into the database. It then refreshes the DataGrid to show the new value. The hardest part to understand is that you have to create a DataGridTableStyle object to do this. The reason for creating this object is that the class provides the necessary methods and properties that you need to access. private void updateButton_Click(object sender, System.EventArgs e) { //DataGridTableStyle provides the mechanisms DataGridTableStyle ts1 = new DataGridTableStyle(); //DataGridCell allows you to hold the contents of the specified cell DataGridCell myCell; myCell = UserdataGrid.CurrentCell; // map the DataGridTableStyle object to the database source ts1.MappingName = "SessionTable"; //Add the DataGridTableStyle object to the grid's TableStyles collection UserdataGrid.TableStyles.Add(ts1); string infoStr = null; int j = 0; //The two foreach statements is a loop within a loop //The outer loop deals with the row index //The inner loop returns the column number (j) if there is a match //and the infoStr(column to change) foreach(DataGridTableStyle gridStyle in UserdataGrid.TableStyles) { foreach(DataGridColumnStyle colStyle in gridStyle.GridColumnStyles) { if (j == myCell.ColumnNumber) { infoStr = colStyle.MappingName; } j++; } //end inner foreach } //end outer foreach //The element selection has been found //and the current row index is where it can be found int i = UserdataGrid.CurrentRowIndex; //Get the unique id associated with this row //Note that I needed to make this GUID id part of //my DataTable so that when I update the sql table //I am updating only that particular record //and not other records that may have similiar entries String userId = UserdataGrid[i, 7].ToString(); //The UpdateRecord method creates an SQL update statement //Parameters are: //Table to change //Column to change //Column to search for GUID id //match on GUID id will determine row index //Value to update sql.UpdateRecord("SessionTable", infoStr, "UserId", userId, UserdataGrid[myCell].ToString()); //Now all we need to do is show the changes in the DataGrid FillData(); UserdataGrid.SetDataBinding(dataSet, "SessionTable"); UserdataGrid.Refresh(); } Whoooo!!! It sure seems like alot of work just to get a value, change it and then display t

    C# help question

  • StreamReader - Client
    S Snowblind37

    I'm sorry but you have to be more specific. Are you the client or the server at this point. If you are the client, have you received a stream from the server? If you are the server, are you trying to read a file from the client?

    C# question

  • Need help using an abstract WebMethod
    S Snowblind37

    Before I pull out my hair out, throw the computer out the window, step on the neighbours cat, drive my car over the cliff or all of the above......I thought maybe I could ask for some help. The concept is simple....or so it would seem. I want to call a WebMethod with my credentials and get the information about my account back. Hmmm, should be a piece of cake. The problem is that the class created by wsdl.exe is an abstract class with abstract methods. So I created a class that implements those methods using override. Here is the basic setup: The abstract class created by wsdl [System.Web.Services.WebServiceBindingAttribute(Name="AccountsSoap", Namespace="http://address")] public abstract class ServiceAccounts : System.Web.Services.WebService { [System.Web.Services.WebMethodAttribute()] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://address/QueryProfile", RequestNamespace="http://address", ResponseNamespace="http://address", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public abstract AccountProfile QueryProfile(Credentials credentials); } The class to implement [WebService(Name="ServiceAccounts",Description="Provides a callback mechanism",Namespace="http://address/accounts")] public class AccountsImpl : Project.App.Tls.Accounts.ServiceAccounts { [WebMethod(MessageName="QueryProfile",Description="Gets the profile of the specified client.",EnableSession=false)] public override AccountProfile QueryProfile(Credentials credentials) { //What do I put in here? } And finally the call private void sendButton_Click(object sender, System.EventArgs e) { CredentialCache myCache = new CredentialCache(); NetworkCredential netCred = new NetworkCredential("name1", "pwd1", "domain"); ((CredentialCache) myCache).Add(destUri, "NTLM", netCred); ((CredentialCache) myCache).Add(destUri, "negotiate", netCred); ((CredentialCache) myCache).Add(destUri, "digest", netCred); accounts.credentials.Account = "name2"; accounts.credentials.Password = "pwd2"; accountProfile = accounts.QueryProfile(accounts.credentials); } Now, I'm sure you are all wondering what my problem is....My problem is that I don't know what to put in my implementation of QueryProfile() to make it call the webMethod. All of the implementations I have seen say to create a new object o

    C# help wcf security question workspace
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups