storing text in a string in c#
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: storing text in a string in c#

  1. #1
    Join Date
    Apr 2011
    Posts
    54

    storing text in a string in c#

    what's the best approach in storing this text/string value in c#?

    for example, this text (below) - can i store this into one string variable? I need to store this in a variable or array and retrieve this later.

    Thanks in advance.

    Sample text:

    [1/25/12 1:06:11:621 CST] 0000003b ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getObjects" on bean "BeanId(FileNetEngine#Engine-ejb-ws.jar#Engine, null)". Exception data: com.filenet.api.exception.EngineRuntimeException: SECURITY_LDAP_PROVIDER_FAILED: LDAP Provider Access failed for principal 'P8PEAdmin_DEV'. Root cause: SANETDCPRD01:3268; socket closed
    at com.filenet.engine.security.SecurityProvider.getUser(SecurityProvider.java:681)
    at com.filenet.engine.jca.impl.RequestBrokerImpl.getUserName(RequestBrokerImpl.java:1291)
    at com.filenet.engine.ejb.EngineCoreBean._getUserName(EngineCoreBean.java:762)
    at com.filenet.engine.ejb.EngineCoreBean.getUserName(EngineCoreBean.java:744)
    at com.filenet.engine.ejb.EJSLocalStatelessEngineCore_22877cb1.getUserName(Unknown Source)
    at com.filenet.engine.ejb.EngineBean.processUserLicense(EngineBean.java:975)
    at com.filenet.engine.ejb.EngineBean.methodInit(EngineBean.java:175)
    at com.filenet.engine.ejb.EngineBean.getObjects(EngineBean.java:307)
    at com.filenet.apiimpl.transport.ejbstubs.EJSRemoteStatelessEngine_2e64c374.getObjects(Unknown Source)
    at com.filenet.apiimpl.transport.ejbstubs._EJSRemoteStatelessEngine_2e64c374_Tie.getObjects(_EJSRemoteStatelessEngine_2e64c374_Tie.java:184)
    at com.filenet.apiimpl.transport.ejbstubs._EJSRemoteStatelessEngine_2e64c374_Tie._invoke(_EJSRemoteStatelessEngine_2e64c374_Tie.java:98)
    at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
    at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
    at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
    at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
    at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
    at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
    at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
    at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
    Caused by: com.filenet.api.exception.EngineRuntimeException: E_OBJECT_NOT_FOUND: Requested item not found. Principal P8PEAdmin_DEV not found.
    at com.filenet.engine.security.DirectoryServiceDriver.getNamedUser(DirectoryServiceDriver.java:130)
    at com.filenet.engine.security.SecurityProvider.getUser(SecurityProvider.java:662)
    ... 19 more
    Caused by: javax.naming.ServiceUnavailableException: SANETDCPRD01:3268; socket closed; remaining name ''
    at com.sun.jndi.ldap.Connection.readReply(Connection.java:438)
    at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:626)
    at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:549)
    at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1959)
    at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1821)
    at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1746)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:383)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:353)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:336)
    at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:259)
    at com.filenet.api.engine.DirectoryContext.search(DirectoryContext.java:96)
    at com.filenet.engine.security.LdapFailoverHandler.search(LdapFailoverHandler.java:240)
    at com.filenet.engine.security.ActiveDirectoryProvider.execSearch(ActiveDirectoryProvider.java:5180)
    at com.filenet.engine.security.ActiveDirectoryProvider.getEntriesByShortNameFromGC(ActiveDirectoryProvider.java:2769)
    at com.filenet.engine.security.ActiveDirectoryProvider.getPrincipalsByShortNameEx(ActiveDirectoryProvider.java:2484)
    at com.filenet.engine.security.ActiveDirectoryProvider.getPrincipalByShortName(ActiveDirectoryProvider.java:2395)
    at com.filenet.engine.security.ActiveDirectoryProvider.getUserByShortName(ActiveDirectoryProvider.java:353)
    at com.filenet.engine.security.DirectoryServiceDriver.sspGetUserByName(DirectoryServiceDriver.java:694)
    at com.filenet.engine.security.DirectoryServiceDriver.getNamedUser(DirectoryServiceDriver.java:107)
    ... 20 more

  2. #2
    Join Date
    Jun 2008
    Posts
    2,477

    Re: storing text in a string in c#

    Umm, yes, a string holds character data.
    If you liked my post go ahead and give me an upvote so that my epee.... ahem, reputation will grow.

    Yes; I have a blog too - http://the-angry-gorilla.com/

  3. #3
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,835

    Re: storing text in a string in c#

    I'm curious why you did not just try it and see if it worked? That is afterall what strings are for.
    Always use [code][/code] tags when posting code.

  4. #4
    Join Date
    Apr 2011
    Posts
    54

    Re: storing text in a string in c#

    i was getting an error - with something like element out of range so i thought, was i reaching some sort of a max for my string variable.. then i traced again and it came out that the error was for another line.

    thanks :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center