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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

get external IP address

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :WPF
  public class ExtIpProvider
    private const string WhatIsMyIp = "http://www.whatismyip.com/automation/n09230945.asp";

    public string GetAddress()
      var WebReq = (HttpWebRequest)WebRequest.Create(WhatIsMyIp);
      var WebResp = (HttpWebResponse)WebReq.GetResponse();

      string addr = new StreamReader(WebResp.GetResponseStream()).ReadToEnd();
      return addr;

View Complete Post

More Related Resource Links

SQL 2008 External access returns wrong address for Report Manager

Hello, I have problems with the external access for report server. My report server is running in a local server on port 80, which can be accessed through http://servername/reports I have set up external access to the report server through http://servername.domain.com:8081/reports , so I set up a redirection from public port 8081 to port 80 on the local server. When I write the address http://servername.domain.com:8081/reports in a browser, I get asked for user authentication(Windows domain user), which is accepted, but after that I get an error because the URL automatically changes to http://servername.domain.com/Reports/Pages/Folder.aspx (without the port 8081) If I write http://servername.domain.com:8081/Reports/Pages/Folder.aspx , it works. I can see the report manager home page and browse through my reports. But there are some links in the page that are built improperly, since they still point to the wrong URL (without port 8081). These are e.g. the Help link, the Report Builder link, the Details view link.  So I think there is something wrong with the response the report server sends, when I write ".../Reports" and returns ".../Reports/Pages/Folders.aspx" I haven't found any configuration file or property where this response is specified, neither where the report

how to configure the incoming email for external email address?



I would like to configure the incoming email for external email address. I have configured the incomig email for the address: library1@sp.myorg.loc Do you know how to set the email for library1@sp.mydomain.com ?

thanks in advance


get external IP address

  public class ExtIpProvider
    private const string WhatIsMyIp = "http://www.whatismyip.com/automation/n09230945.asp";

    public string GetAddress()
      var WebReq = (HttpWebRequest)WebRequest.Create(WhatIsMyIp);
      var WebResp = (HttpWebResponse)WebReq.GetResponse();

      string addr = new StreamReader(WebResp.GetResponseStream()).ReadToEnd();
      return addr;

IP Address Blocking or Restriction in SQL Server

"is it possible to block connections to SQL Server based on IP address". As far as now there is no official way in SQL Server to block the connections in SQL Server based on IP address. However this can be done from the OS end, we have the following three options available, refer HERE for more.

.RRAS IP Filter

my ip address

IP Tejji answers question like what is my ip address? find my ip addresss? detect my ip address? Best part is it also determines your local ip address as well as mac address. Further if you keen on browser specification and details regarding browser capabilities can also be found. It also help you see your geographic location. Other details that are available are Latitude, Longitude, timezone, country, region & city. In short it is one-stop-shop for very rich details about your IP and related information.

Handling external C++ exceptions


Hi. I'm working in a application that uses an external .Dll developed in C++ language. According the business rule, the .Dll can throws one exception if it found a error. My question is if it's possible handle or catch a exception throwed by the C++ dll? The try/catch doesn't works. Bellow there's the code I'm using to call the C++ dll.

        public extern static IntPtr LoadLibrary(string lpLibFileName);

        [DllImport("kernel32", CharSet = CharSet.Ansi)]
        public extern static IntPtr GetProcAddress(IntPtr hLibModule, string procName);

        public extern static bool FreeLibrary(IntPtr hLibModule);

        private delegate void DllMethodCallBack(string param1, string param2);

        public void CallDllMethod(string param1, string param2)

SOA Tips: Address Scalability Bottlenecks with Distributed Caching


SOA makes application scalability easier, but getting the best performance out of your SOA means paying close attention to the details. We'll give you some tips for coding your app more effectively and using distributed caching to remove data access bottlenecks.

Iqbal Khan

MSDN Magazine June 2010

Advanced Basics: What's My IP Address?


If you're like me, you regularly do tech-support for family, friends, and neighbors. You can't go to a party without hearing the familiar refrain: "I've just got a quick question. " It's always something-their Internet connections get dropped, they've got a virus, they can't install some piece of hardware, or some file has gone missing.

Ken Getz

MSDN Magazine December 2005

XML Schemas: Take Advantage of Existing External XML Schemas with a Custom Import Framework in ASP.N


Over the years, many industry-standard XML schemas and dialects have been developed. These industry-specific schemas embrace the original purpose of XML and are extremely valuable in promoting and supporting B2B interaction. Unfortunately, the ASP.NET Web Services runtime does not allow developers to directly reference external schemas from within their XML Web Services interface (the WSDL file). This article builds an external schema framework as an extension to the ASP.NET Web Services runtime to enable you to reference external schemas within your XML Web Service interface.

Scott Short

MSDN Magazine December 2002

External Assembly for Controllers...


I am just learning MVC, so bear with me.

I would like to have a project that contains all of my Controller logic. I'm not concerned with using Areas, as these are still maintained within the same project. 

Consider this scenario:

I have multiple sites/apps that require the exact same interaction in regards to a particular area, say CRUD ops on a user account. I do not want to create all of the controller logic for one site/app, recreate it again for the next, and make sure that I keep all maintenance to each in sync. I would prefer to keep the controllers in a separate project and reference them from the appropriate site.

I know someone will say that the controller logic is a lot of times specific to the application (as I've read elsewhere), but let's just say that it is guaranteed to be the same. I want to focus on the "how" and not the "why".

So far, I've created a class library project with the appropriate references for accessing System.Web.Mvc. How do I proceed with the routing configuration for this? Is this idea even possible? I read a few older articles that were written when Areas were first being introduced that said to create separate projects for them. Is this idea similar to that?

Thanks for your time and noob tolerance.

Share Point integrated SSRS reports rendering when access from external site


Our client has a SharePoint (moss2007) site on Windows 2008, SQL2008 R2 Enterprise, and Reporting service is integrated with SharePoint

The authentication on the share point integration is set to windows, else the authentication for the SSAS datasource gives and error

The extranet zone ( forms) and intranet (Customer Forms) and default (Windows) zones are all access from inside the firewall and the reports render in each with no issues, as the datasources are configured to pass a sql username and password.

However, report rendering is a problem from the internet (external site), the following error is displayed:

An unexpected error occurred while connecting to the report server. Verify that the report server is avai

BCS Updater Method in External Content type


HI, I have a List (External Content type ) with CRUD methods written.for example. Employee with fields






If want to update only Remarks field and want to display the other fields.(other field should not be editable). How can i do it throught VS2010. If I made those fields readOnly and preupdaterField true. those fields not displays while editing. I want to show those fields but not to edit. any suggestions????

2)while displaying (ReadList )if I want to display only EmpName and EmpID.How can i do it?


or please try to give some links about all the properties for a Type Decriptor and how they are related with CRUD methods.



external content not load in page like style and js in asp.net mvc when i use area


i am working on a asp.net mvc 2 website who have a area and i have a problem with them.

i use different different url routing for application settings. i have two folder called style

first folder location in main directory  /Style/style.css

second folder location in Area area/style/style.css

everything is work fine in application but when i used style.css from main directory in my area's views then style not worked. when i track them from firebug then i got error "The resource could not be found" but path is correct.

sombody tell me to use absolute path to solve this issue. how i can use absolute path to declare resource url in views.

any suggestion , sollution on this issue who can help me to solve this issue.

Can i Map to external link from document library folder



Is There any one know how to link document library folder is to external site 



Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

Learn to use Visual Studio 2010 to create a Visual Web Part that uses a BCS external content type in SharePoint Server 2010 to read and write data to the AdventureWorks sample database.

Sample: Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

Explore the code in this visual how-to article as you learn to use Visual Studio 2010 to create a Visual Web Part that uses a BCS external content type in SharePoint Server 2010.

Creating SharePoint Server 2010 External Content Type Associations with SharePoint Designer 2010

Learn how to use Business Connectivity Services (BCS) to create associations between external content types in SharePoint Designer 2010 without using code.
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