Daily Archives

Articles indexed Saturday May 8 2010

Page 11/78 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • SQL Server 2005 - Enabling both Named Pipes & TCP/IP protocols?

    - by Clinemi
    We have a SQL Server 2005 database, and currently all our users are connecting to the database via the TCP/IP protocol. The SQL Server Configuration Manager allows you to "enable" both Named Pipes, and TCP/IP connections at the same time. Is this a good idea? My question is not whether we should use named pipes instead of TCP/IP, but are there problems associated with enabling both? One of our client's IT guys, says that enabling database communication with both protocols will limit the bandwidth that either protocol can use - to like 50% of the total. I would think that the bandwidth that TCP/IP could use would be directly tied (inversely) to the amount of traffic that Named Pipes (or any of the other types of traffic) were occupying on the network at that moment. However, this IT person is indicating that the fact that we have enabled two protocols on the server, artificially limits the bandwidth that TCP/IP can use. Is this correct? I did Google searches but could not come up with an answer to this question. Any help would be appreciated.

    Read the article

  • Strange intermittent SQL connection error, fixes on reboot, comes back after 3-5 days (ASP.NET)

    - by Ryan
    For some reason every 3-5 days our web app loses the ability to open a connection to the db with the following error, the strange thing is that all we have to do is reboot the container (it is a VPS) and it is restored to normal functionality. Then a few days later or so it happens again. Has anyone ever had such a problem? I have noticed a lot of ANONYMOUS LOGONs in the security log in the middle of the night from our AD server which is strange, and also some from an IP in Amsterdam. I am not sure how to tell what exactly they mean or if it is related or not. Server Error in '/ntsb' Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Source Error: Line 11: Line 12: Line 13: dbConnection.Open() Line 14: Line 15: Source File: C:\Inetpub\wwwroot\includes\connection.ascx Line: 13 Stack Trace: [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +248 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +475 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +260 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +2445449 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +2445144 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +354 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +703 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +54 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +2414696 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +92 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1657 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +84 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +1645687 System.Data.SqlClient.SqlConnection.Open() +258 ASP.includes_connection_ascx.getConnection() in C:\Inetpub\wwwroot\includes\connection.ascx:13 ASP.default_aspx.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Default.aspx:16 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42 System.Web.UI.Control.OnLoad(EventArgs e) +132 System.Web.UI.Control.LoadRecursive() +66 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428 Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

    Read the article

  • Recommendations for 'C' Project architecture guidelines?

    - by SiegeX
    Now that I got my head wrapped around the 'C' language to a point where I feel proficient enough to write clean code, I'd like to focus my attention on project architecture guidelines. I'm looking for a good resource that coves the following topics: How to create an interface that promotes code maintainability and is extensible for future upgrades. Library creation guidelines. Example, when should I consider using static vs dynamic libraries. How to properly design an ABI to cope with either one. Header files: what to partition out and when. Examples on when to use 1:1 vs 1:many .h to .c Anything you feel I missed but is important when attempting to architect a new C project. Ideally, I'd like to see some example projects ranging from small to large and see how the architecture changes depending on project size, function or customer. What resource(s) would you recommend for such topics?

    Read the article

  • Synchronizing reading and writing with synchronous NamedPipes

    - by Mike Trader
    A Named Pipe Server is created with hPipe = CreateNamedPipe( zPipePath, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT | PIPE_READMODE_BYTE, PIPE_UNLIMITED_INSTANCES, 8192, 8192, NMPWAIT_USE_DEFAULT_WAIT, NULL) Then we immediately call: ConnectNamedPipe( hPipe, BYVAL %NULL ) Which blocks until the client connects. Then we proceed directly to ReadFile( hPipe, ... The problem is that it takes the Client takes a finite amount of time to prepare and write all the fcgi request parameters. This has usually not completed before the Pipe Server performs its ReadFile(). The Read file operation thus finds no data in the pipe and the process fails. Is there a mechanism to tell when a Write() has occurred/finished after a client has connected to a NamedPipe? If I had control of the Client process, I could use a common Mutex, but I don't, and I really do not want to get into I/O completion ports just to solve this problem! I can of course use a simple timer to wait 60m/s or so which is usually plenty of time for the wrote to complete, but that is a horrible hack.

    Read the article

  • Communicating with a driver over a network in Windows

    - by workinprogress
    How could I communicate with a driver from a usermode application over a network? I can't have the driver communicate with a local usermode application which then communicates with the remote application because that wouldn't work for what I'm doing. I was thinking of using named pipes but I'm not sure if that would work over a network.

    Read the article

  • NamedPipeClientStream StreamReader problem in C++

    - by Chris Porter
    When reading from a NamedPipes server using the .net NamedPipeClientStream class I can only get the data on the first read in C++, every time it's just an empty string. In c# it works every time. pipeClient = gcnew NamedPipeClientStream(".", "Server_OUT", PipeDirection::In); try { pipeClient->Connect(); } catch(TimeoutException^ e) { // swallow } StreamReader^ sr = gcnew StreamReader(pipeClient); String^ temp; while (temp = sr->ReadLine()) { // = sr->ReadLine(); Console::WriteLine("Received from server: {0}", temp); } sr->Close();

    Read the article

  • how do I paste text to a line by line text filter like awk, without having stdin echo to the screen?

    - by Barton Chittenden
    I have a text in an email on a windows box that looks something like this: 100 some random text 101 some more random text 102 lots of random text, all different 103 lots of random text, all the same I want to extract the numbers, i.e. the first word on each line. I've got a terminal running bash open on my Linux box... If these were in a text file, I would do this: awk '{print $1}' mytextfile.txt I would like to paste these in, and get my numbers out, without creating a temp file. my naive first attempt looked like this: $ awk '{print $1}' 100 some random text 100 101 some more random text 101 102 lots of random text, all different 103 lots of random text, all the same 102 103 The buffering of stdin and stdout make a hash of this. I wouldn't mind if stdin all printed first, followed by all of stdout; this is what would happen if I were to paste into 'sort' for example, but awk and sed are a different story. a little more thought gave me this: open two terminals. Create a fifo file. Read from the fifo on one terminal, write to it on another. This does in fact work, but I'm lazy. I don't want to open a second terminal. Is there a way in the shell that I can hide the text echoed to the screen when I'm passing it in to a pipe, so that I paste this: 100 some random text 101 some more random text 102 lots of random text, all different 103 lots of random text, all the same but see this? $ awk '{print $1}' 100 101 102 103

    Read the article

  • Has anyone setup tomcat to run virtual hosts using mod_jk

    - by Adam
    I work in OSX primarily with mostly PHP. Normally I work locally using MAMP and virtual hosts setup in my httpd.conf so that I can point a browser to http://some-project and have as many projects as I need setup. We have a project coming up where we need to serve JSP pages and I would like to set up my local apache server to serve only JSP files to Tomcat and everything else to MAMP using the same virtual hosts setup in: ~/applications/MAMP/conf/apache/httpd.conf So far I have: Successfully installed Tomcat Placed mod_jd.so in ~/applications/MAMP/Library/modules/mod_jk.so Added the module by placing: LoadModule jk_module modules/mod_jk.so in ~/applications/MAMP/conf/apache/httpd.conf Created /Library/Tomcat/Home/conf/jk/workers.properties and added the following lines: workers.tomcat_home=/Library/Tomcat workers.java_home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home ps=/ worker.list=ajp12, ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp12.type=ajp13 worker.ajp13.mount=/*.jsp added the following lines: JkWorkersFile /Library/Tomcat/Home/conf/workers.properties JkLogFile /Library/Tomcat/Home/logs/mod_jk.log JkLogLevel debug to ~/applications/MAMP/conf/apache/httpd.conf I cannot start my MAMP however when these last two lines are present in my httpd.conf. Does anyone work like this? Any tips? Any clear ideas of what I'm doing wrong?

    Read the article

  • WCF InProcFactory error

    - by Terence Lewis
    I'm using IDesign's ServiceModelEx assembly to provide additional functionality over and above what's available in standard WCF. In particular I'm making use of InProcFactory to host some WCF services within my process using Named Pipes. However, my process also declares a TCP endpoint in its configuration file, which I host and open when the process starts. At some later point, when I try to host a second instance of this service using the InProcFactory through the named pipe (from a different service in the same process), for some reason it picks up the TCP endpoint in the configuration file and tries to re-host this endpoint, which throws an exception as the TCP port is already in use from the first hosting. Here is the relevant code from InProcFactory.cs in ServiceModelEx: static HostRecord GetHostRecord<S,I>() where I : class where S : class,I { HostRecord hostRecord; if(m_Hosts.ContainsKey(typeof(S))) { hostRecord = m_Hosts[typeof(S)]; } else { ServiceHost<S> host; if(m_Singletons.ContainsKey(typeof(S))) { S singleton = m_Singletons[typeof(S)] as S; Debug.Assert(singleton != null); host = new ServiceHost<S>(singleton,BaseAddress); } else { host = new ServiceHost<S>(BaseAddress); } string address = BaseAddress.ToString() + Guid.NewGuid().ToString(); hostRecord = new HostRecord(host,address); m_Hosts.Add(typeof(S),hostRecord); host.AddServiceEndpoint(typeof(I),Binding,address); if(m_Throttles.ContainsKey(typeof(S))) { host.SetThrottle(m_Throttles[typeof(S)]); } // This line fails because it tries to open two endpoints, instead of just the named-pipe one host.Open(); } return hostRecord; }

    Read the article

  • Regex javascript to match href

    - by zx
    Hello, <u class="logout" href="/logout.php?h=970c9836674709e6dcdaadd094622fc5&t=1273295318" target="_top">Logout</u> That above is what I want to search for. I want to get h= and t= from that URL, or just get the entire url in href="" How would I do this with regex?

    Read the article

  • Is there a way to generate a short random id, avoiding collisions, without hitting persistent storag

    - by bshacklett
    If you've used GoToMeeting, that's the type of ID I want. I'd like it to be random so that it obfuscates the number of items being tracked and short, so that it's easy to reference manually; UUIDs are way too long. I'd like to avoid hitting persistent storage merely for performance reasons, but I can't think of any other way to avoid collisions. Is 9 digits enough to do something time-based?

    Read the article

  • STL operator= behavior change with Visual Studio 2010?

    - by augnob
    Hi, I am attempting to compile QtScriptGenerator (gitorious) with Visual Studio 2010 (C++) and have run into a compile error. In searching for a solution, I have seen occasional references to compile breakages introduced since VS2008 due to changes in VS2010's implementation of STL and/or c++0x conformance changes. Any ideas what is happening below, or how I could go about fixing it? If the offending code appeared to be QtScriptGenerator's, I think I would have an easier time fixing it.. but it appears to me that the offending code may be in VS2010's STL implementation and I may be required to create a workaround? PS. I am pretty unfamiliar with templates and STL. I have a background in embedded and console projects where such things have until recently often been avoided to reduce memory consumption and cross-compiler risks. C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(275) : error C2679: binary '=' : no operator found which takes a right-hand operand of type 'rpp::pp_output_iterator<_Container>' (or there is no acceptable conversion) with [ _Container=std::string ] c:\qt\qtscriptgenerator\generator\parser\rpp\pp-iterator.h(75): could be 'rpp::pp_output_iterator<_Container> &rpp::pp_output_iterator<_Container>::operator =(const char &)' with [ _Container=std::string ] while trying to match the argument list '(rpp::pp_output_iterator<_Container>, rpp::pp_output_iterator<_Container>)' with [ _Container=std::string ] C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(2176) : see reference to function template instantiation '_Iter &std::_Rechecked<_OutIt,_OutIt>(_Iter &,_UIter)' being compiled with [ _Iter=rpp::pp_output_iterator<std::string>, _OutIt=rpp::pp_output_iterator<std::string>, _UIter=rpp::pp_output_iterator<std::string> ] c:\qt\qtscriptgenerator\generator\parser\rpp\pp-internal.h(83) : see reference to function template instantiation '_OutIt std::copy<std::_String_iterator<_Elem,_Traits,_Alloc>,_OutputIterator>(_InIt,_InIt,_OutIt)' being compiled with [ _OutIt=rpp::pp_output_iterator<std::string>, _Elem=char, _Traits=std::char_traits<char>, _Alloc=std::allocator<char>, _OutputIterator=rpp::pp_output_iterator<std::string>, _InIt=std::_String_iterator<char,std::char_traits<char>,std::allocator<char>> ] c:\qt\qtscriptgenerator\generator\parser\rpp\pp-engine-bits.h(500) : see reference to function template instantiation 'void rpp::_PP_internal::output_line<_OutputIterator>(const std::string &,int,_OutputIterator)' being compiled with [ _OutputIterator=rpp::pp_output_iterator<std::string> ] C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(275) : error C2582: 'operator =' function is unavailable in 'rpp::pp_output_iterator<_Container>' with [ _Container=std::string ] Here's some context.. pp-internal.h-- #ifndef PP_INTERNAL_H #define PP_INTERNAL_H #include <algorithm> #include <stdio.h> namespace rpp { namespace _PP_internal { .. 68 template <typename _OutputIterator> 69 void output_line(const std::string &__filename, int __line, _OutputIterator __result) 70 { 71 std::string __msg; 72 73 __msg += "# "; 74 75 char __line_descr[16]; 76 pp_snprintf (__line_descr, 16, "%d", __line); 77 __msg += __line_descr; 78 79 __msg += " \""; 80 81 if (__filename.empty ()) 82 __msg += "<internal>"; 83 else 84 __msg += __filename; 85 86 __msg += "\"\n"; 87 std::copy (__msg.begin (), __msg.end (), __result); 88 }

    Read the article

  • Python code formatting

    - by Curious2learn
    In response to another question of mine, someone suggested that I avoid long lines in the code and to use PEP-8 rules when writing Python code. One of the PEP-8 rules suggested avoiding lines which are longer than 80 characters. I changed a lot of my code to comply with this requirement without any problems. However, changing the following line in the manner shown below breaks the code. Any ideas why? Does it have to do with the fact that what follows return command has to be in a single line? The line longer that 80 characters: def __str__(self): return "Car Type \n"+"mpg: %.1f \n" % self.mpg + "hp: %.2f \n" %(self.hp) + "pc: %i \n" %self.pc + "unit cost: $%.2f \n" %(self.cost) + "price: $%.2f "%(self.price) The line changed by using Enter key and Spaces as necessary: def __str__(self): return "Car Type \n"+"mpg: %.1f \n" % self.mpg + "hp: %.2f \n" %(self.hp) + "pc: %i \n" %self.pc + "unit cost: $%.2f \n" %(self.cost) + "price: $%.2f "%(self.price)

    Read the article

  • Django code organization

    - by iHeartDucks
    I am working on a Django app and I have a class which reads the contents of a file and returns a Django model. My question is where do I store this class in the file system? All this does is reads the file, populates a Django model and returns it. Thanks

    Read the article

  • Resolving the metadata token of a generic type parameter

    - by 280Z28
    Is there any way the .NET 4.0 (or earlier) reflection API to resolve a generic type parameter? See the two lines after my ArgumentException comment for my current attempt. [TestMethod] public void TestGenericParameterTokenResolution() { Type genericParameter = typeof(List<>).GetGenericArguments()[0]; Assert.IsTrue(genericParameter.IsGenericParameter); int metadataToken = genericParameter.MetadataToken; // make sure the metadata token is a GenericParam Assert.AreEqual(metadataToken & 0xFF000000, 0x2A000000); Module module = typeof(List<>).Module; // the following both throw an ArgumentException. Type resolvedParameter = module.ResolveType(metadataToken); resolvedParameter = (Type)module.ResolveMember(metadataToken); Assert.AreSame(genericParameter, resolvedParameter); }

    Read the article

  • Moss workflow approval using minimal site definition

    - by 78lro
    Hi When using the minimal site definition for moss from codeplex (http://www.codeplex.com/features), after adding the features required for workflow, workflow approval becomes available for the pages library. When I submit a page for approval, the buttons for approve and reject do not appear on the page editing toolbar. I can go and view the workflow approval and approve/reject it but the normal buttons on the page editing toolbar do not appear. Any ideas greatly appreciated.

    Read the article

  • private class calling a method from its outer class

    - by oxinabox.ucc.asn.au
    Ok, so I have a class for a "Advanced Data Structure" (in this case a kinda tree) SO I implimented a Iterator as a private class with in it. So the iterator needs to implement a remove function to remove the last retuirned element. now my ADT already impliments a remove function, and in this case there is very little (thinking about it, i think nothing) to be gain by implimenting a different remove function for the iterator. so how do I go about calling the remove from my ADT sketch of my struture: public class ADT { ... private class ADT_Iterator impliments java.util.Itorator{ ... public void remove(){ //where I want to call the ADT's remove function from } ... public void remove( Object paramFoo ) { ... } ... } So just calling remove(FooInstance) won't work (will it?) and this.remove(FooInstance) is the same thing. what do i call? (and changign the name of the ADT's remove function is not an option, as that AD T has to meet an Interace wich I am note at liberty to change) I could make both of them call a removeHelper functon, I guess...

    Read the article

  • Android: I uploaded my first app! Keywords?...

    - by Allan
    I've just uploaded my first app on the market. It all went and looks well. I tried a few keywords to search for it, words that I also have in my description AND promo text, but some words don't find my app, some do. How does the keyword strategy work for an app on the market, I couldn't find no documentation on it.

    Read the article

  • https root webapp in jboss 5 through apache mod_proxy with ajp

    - by Jesus
    hi, i have apache 2.2.3 and jboss 5.1 installed in my server, in apache i have 2 apps in php+mysql and in jboss i have in the root app (/) liferay portal. i used mod_proxy to reach the jboss app : <VirtualHost server_ip:80> ServerName intranet.mycompany.com ProxyPreserveHost On ProxyPass / balancer://jbosscluster/ ProxyPassReverse / http://server_ip:8080 </VirtualHost> but now i have to enable https only in intranet.mycompany.com, and i dont know where configure the ssl, in apache, jboss, both. i tried in jboss in the server.xml, generating a selfsigned certificate with keytool, but apache doesnt forward to https://server_ip:8443 i will appreciate your help.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >