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
T

tdata

@tdata
About
Posts
4
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WCF in Managed Application
    T tdata

    *Note I don't know the proper terminology for what I am asking so bear with me... I am hosting a WCF Service within a Managed application. In other words I have an application that is running a ServiceHost. I did not set it up as an Independent service, it is embedded within the app. Now I have run into a variety of issues. The first being:

    System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:48921

    I know this is due to UAC on Vista/Win7. I however have found no way to fix it from the developer side of things. Any clue how to resolve the error without the user having to do anything? My second issue:

    System.ServiceModel.FaultException: The server was unable to process the request due to an internal
    error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from
    ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order
    to send the exception information back to the client, or turn on tracing as per the Microsoft .NET
    Framework 3.0 SDK documentation and inspect the

    Now for this one, I am clueless. 1) I don't know how to enable it inside a Managed App that doesn't use a config file. 2) from what I read, you have to have a good Idea of exactly what error it would produce. My last issue is that I cannot get the client and server to work correctly in .NET 3.5. Everything I try doesn't seem to work correctly. So, I am being 'forced' to use 4.0. (Not that I mind. Seems to run faster anyway.) There was another that I think i fixed on my own, it dealt with the port already being in use. Since i run the commands in new threads they can sometimes hit at the wrong time... So I have it wait for them to complete before running the next.

    WCF and WF help csharp wcf sysadmin hosting

  • 'Basic' Client /Server
    T tdata

    Seems I do need more help after all. I have 2 main issues. The first is that I get different results when using the .NET 3.5 Framework and the .NET 4.0 Framework. The app functions correctly in 4.0 but returns a few odd things in 3.5. While all in all it doesn't matter, I'm using 4.0 as the primary anyway, it does pose a problem on the end-user. 3.5 is standard but 4.0 is in beta4 so most will not touch it. My second problem is this:

    System.ServiceModel.CommunicationObjectFaultedException: The communication object,
    System.ServiceModel.ServiceHost, cannot be used for communication because it is in the Faulted state.
    at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
    at System.ServiceModel.ServiceHostBase.System.IDisposable.Dispose()
    at Impur.Game.Network.Server.Program.Main(String[] args)

    Now, I understand the error. It is because I went the Using route when making my ServiceHost. My problem is that I don't know hot to do it another way. Now, my app works perfectly on my computer, but gives that error on my Dev Tester's computer. Here is the code I use. Maybe you can tell me how to do it another way:

                using (ServiceHost host = new ServiceHost(
                    typeof(Actions),
                    new Uri\[\]{
                    new Uri("http://localhost:8000"),
                    new Uri("net.pipe://localhost")
                }))
    

    EDIT:: Fixed the Second problem and have now encountered:

    System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:8000/. Your
    process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353
    for details). ---> System.Net.HttpListenerException: Access is denied

    This one I have no clue about.

    C# help tutorial question csharp database

  • 'Basic' Client /Server
    T tdata

    Okay, so WCF is the way to go. And, as I said, it is Pseudo code. ^_^ It shows what I expect the server to do, not exactly what it will do. So, how would I go about using WCF with my example as the start? IE a simple Return of a Bool... I just need to see an example that doesn't rely on a string... ^_^ One more thing. How do you get it to listen for more than one thing. I would think it would have to do with the Channel... But not sure. Thank you for your prior help and for any further help you can provide. Nevermind, I figured it out, I think. You just add more Functions to the Interface... Now I just need to find a cheap Windows Server to test it on... EDIT:: I can't seem to get it to report errors other than System.ServiceModel errors. I missed a MySQL error because All I got from the Debugger was that an Internal error occurred... Not a big deal, but a bit annoying...

    modified on Monday, February 22, 2010 8:18 PM

    C# help tutorial question csharp database

  • 'Basic' Client /Server
    T tdata

    Been looking for quite some time for the answer to my question. How do I do this in C#:

    //Note: Pseudo Code for example purposes only...
    [Client]
    SendToServer(ClientActions.Login, username, password);

    [Server]
    ReceiveRequest(Tag, pram1, pram2);
    if (tag == ClientActions.Login)
    {
    bool exUser = UserExist(pram1, pram2);
    if (exUser)
    SendToClient(ServerAction.Exist);
    else
    SendToClient(ServerAction.NotExist);
    }

    [Client]
    ReceiveResponse(Response);
    if (Response == ServerAction.Exist)
    // Display message of response
    else
    // Display message of response

    I am trying to setup a MultiPerson game using C# as my primary. Currently I have the client access the database directly because I have found no tutorials explaining how to this sort of thing. Mostly I have found Chat servers which do not help me figure this problem out. I have been able to do the above using alternate means, but since I will need to do more than send a few simple strings, I have no clue how to do it... My main issue is figuring out how to get both the client and the server to know how to deal with whatever comes down the pipe. My progression after the above would have been to ask the server for the userdata and have the server send a List object back. But I don't know how to do it. I would appreciate any and all help for this.

    C# help tutorial question csharp database
  • Login

  • Don't have an account? Register

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