.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

AAM for other ports?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#


So, I have two Sharepoint web applications. Let call them Application1 and Application2.

Application1 is accessed via http://notMachineName1

Application2 is accessed via http://notMachineName2

Application 1 runs on port 80 and Application 2 runs (or should run) on port 84 and the URL's used are directed from the DNS.

Everything works as expected BUT the settings from web.config. Both applications get their settings from the same web.config, which in this case is a problem as the connectionstrings (amongst other things) are different. To clarify, these applications use other databases than the content db's for Sharepoint and that's where my problem is, fetching data from other db's not tightly coupled with Sharepoint. The settings that both applications pick up is from the web.config for the 80 port.


AAM mappings in CA

http://servername Default http://servername

View Complete Post

More Related Resource Links

Windows Sockets 2.0: Write Scalable Winsock Apps Using Completion Ports


Writing a network-aware application isn't difficult, but writing one that is scalable can be challenging. Overlapped I/O using completion ports provides true scalability on Windows NT and Windows 2000. Completion ports and Windows Sockets 2.0 can be used to design applications that will scale to thousands of connections. The article begins with a discussion of the implementation of a scalable server, discusses handling low-resource, high-demand conditions, and addresses the most common problems with scalability.

Anthony Jones and Amol Deshpande

MSDN Magazine October 2000

Comport communication using System.IO.Ports

I am using System.IO.Ports to communicate the with the printer(Com RS 232). What i want to know is how can i determine weather the Printer is Power on or not.. (i mean Printer is power cable is plugged in and Power on) and also When to use HandShake.XON/XOFF 

Scan Ports

I want to scan my local ports and find open ones. how can I do this in VB.Net?? I want to find open ports form my Socket Listener. I have this code - but it is too slow Public Shared Sub Main() Dim intPortStart As Integer = 100 Dim intPortEnd As Integer = 500 Dim lngLoop As Long For lngLoop = intPortStart To intPortEnd Dim myTcpClient As New TcpClient() Try myTcpClient.Connect("", lngLoop) Console.WriteLine("Port " + lngLoop.ToString() + "started") myTcpClient.Close() Catch ex As SocketException Console.WriteLine("Port " + lngLoop.ToString() + " Closed" + ex.Message) End Try Next End Sub

Pinvoke : GetCommConfig not working for parallel ports like lpt1



Through PInvoke from VB.net, I am using GetCommConfig and GetDefaultCommConfig to find info on ports present on the computer. However these functions are succeeding only for Serial Ports like COM1 etc and failing for Parallel Ports like LPT1.

Is This by design? The documentation suggests this should succeed for both serial and parallel ports as well as others.


Mathew Kochekkan

Enumerating used and available network ports on remote server


I am working on a setting up a web app, using C# and .Net, to setup/manage an internally deployed product. Part of this requires adding new instances and configuring them which means knowing if a port is available on the remote server.

I've done a bit of searching and can't seem to find a way to do this on a remote system. I could find ways to do it locally which if that is the only way then I may end up doing a localized service to have the web app talk to instead but I wanted to check if there was a way to get this info remotely.




SQL 2008 R2 Dynamic Ports and Static Ports


We have a single application (Interaction) that needs the port number specified in the application itself in order to 'talk' to its SQL database. The SQL environment consists of a two node cluster with two named instances. Each of the instances are divided equally between the nodes. We are obviously using dynamic ports on both of our names instances. I gave the application owner the port that the instance the database is currently running on. He hasn't gotten back to me yet, however, I suspect that when he specifies that port in the application it will connect to the database just fine. If it does, I need to come up with a plan for this one application.

Is there a way to use both dynamic ports with a static port specified? In the TCP/IP properties under the instance name, dynamic ports are used because the 'TCP Dynamic Ports' is set to '0'. Can I set it to something like '0,5100'? That way it'll still use dynamic ports with a specific port to always listen on? It seems like a stretch, but I'd rather not change my whole environment due to one silly application.

Another solution is to maybe create another instance for this one application and set the port statically? That's also very silly in my opinion to have a dedicated instance with only one database to set a static port. If anyone has any other creative ideas, besides just using the

JDBC Connection using Dynamic Ports


I have a sql cluster running 3 instances.One of the user is trying to connect to these instances using JDBC connectivity.We have configured to use Dynamic ports so the url with the default port is not working for us and I cannot change the port.Can you please plese let me know the URL for this.Also on the Surface Area Configuration Manager I sec Client Protocols ,How is this different from the Protocols for each instance.




Single WCF Service with multiple ports


Hi All,

            I have  created a WCF service that receive and  give the update to subscribing clients. Now, we host that service on single server only ( this service is hosted as a window service) , So i want when WCF receive any update from a specific client   and  it will give the update  to  only that  specific  client .  I don't want to create separate service for every client . Can i achieve this in single WCF Config file by mention different Ports for each client?  I am using net tcp approach that is best suited for my environment.  I have used BaseAddressPrefix and also mention the URI directly in the endpoints but it  give update to all clients subscribe on different ports. Any solution?  I only wants  this in that way if possible "specific port for that specific client".

Thanks in advance

asynchronous code for checking ports


Hi there,

I have some code which connects to a port quickly and if it can connect then it turns the line in the gridview green, if it cant and times out then it turns the line red. This is great, the problem i have is that the page takes a long time to load (as it has to check each port first) and then if i want to check again if the port is up / down i have to manually refresh it which is not what im after.

  protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        for (int i = 0; i < GridView1.Rows.Count; i++)
            string strHost = "";
            int StartPort = 0;
            GridViewRow Row = GridView1.Rows[i];

            strHost = Row.Cells[3].Text;
            StartPort = Convert.ToInt32(Row.Cells[2].Text);

            int CurrPort = StartPort;
                TcpClient TcpScan = new TcpClient();

                    TcpScan.Connect(strHost, CurrPort);
                    e.Row.BackColor = Color.Green;

                    e.Row.BackColor = Color.Red;

        }//end of loop    


The code is in a loop and cycles through the various ports in the DB, what i want to know is how i can writ

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend