How to Generate Web Service Proxy

by Admin 12. September 2008 12:24

Simply run this command in VS command prompt

wsdl /o:MyService.cs /n:namespace.goes.here http://localhost/Service.asmx

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

asp.net

'ProfileCommon' could not be found

by admin 10. July 2008 22:47

After publishing web project to production server i had this message:

The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive or an assembly reference?)

I've deleted everything and re-published web project and now everything is ok.

Anybody knows why this is happening (sometimes)?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

asp.net

This page contains both secure and unsecure items

by admin 9. June 2008 15:44

Are your SSL pages plagued by the IE warning "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?"

Rather than changing all the links to https://, change them to just //

<img src="//www.domain.com/image.gif" alt="" />

Alternatively, if the images or scripts are located on the same domain, you can access them relatively, rather than absolutely:

<img src="image.gif" alt="" />

Using this method, the browser will know that it must load the image securely if the web page is being loaded securely but it will also load the image normally if the page is not being accessed securely. The image will still need to be available on the other server securely.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

asp.net | html | Security | SSL

List of assemblies marked with AllowPartiallyTrustedCallersAttribute in .net 3.5

by admin 30. May 2008 15:37
  • Accessibility.dll

  • IEExecRemote.dll

  • Microsoft.JScript.dll (applied in version 2.0)

  • Microsoft.VisualBasic.dll

  • Mscorlib.dll

  • System.dll

  • System.Configuration.dll (applied in version 2.0)

  • System.Data.dll

  • System.Data.Linq.dll

  • System.Deployment.dll (applied in version 2.0)

  • System.DirectoryServices.dll (applied in version 2.0)

  • System.DirectoryServices.Protocols.dll (applied in version 2.0)

  • System.Drawing.dll

  • System.Linq.dll

  • System.Security.dll (applied in version 2.0)

  • System.Transactions.dll (applied in version 2.0)

  • System.Web.dll (applied in versions 1.1 and 2.0)

  • System.Web.Mobile.dll (applied in versions 1.1 and 2.0)

  • System.Web.RegularExpressions.dll (applied in versions 1.1 and 2.0)

  • System.Web.Services.dll

  • System.Windows.Forms.dll

  • System.XML.dll

  • Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Tags:

    asp.net

    Global assembly cache Tip

    by admin 16. May 2008 10:54

    The %SystemRoot%\Assembly folder is the global assembly cache.

    You cannot directly use Windows Explorer to edit ACLs for this folder. Instead, use a command prompt and run the following command:

    cacls %windir%\assembly /e /t /p domain\useraccount:r

    Alternatively, prior to using Windows Explorer, unregister Shfusion.dll with the following command to give permissions via the GUI:

    C:\WINDOWS\Microsoft.NET\Framework\VersionNumber>regsvr32–u shfusion.dll

    After setting permissions with Windows Explorer, re-register Shfusion.dll with the following command:

    C:\WINDOWS\Microsoft.NET\Framework\VersionNumber>regsvr32 shfusion.dll

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Tags:

    asp.net | IIS

    Requested registry access is not allowed.

    by admin 18. April 2008 11:04

    SYMPTOMS
    When you use ASP.NET to create a new event source in the event log, you may receive the following error message:

     System.Security.SecurityException: Requested registry access is not allowed.

    RESOLUTION

    Follow this link for resolution.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Tags:

    asp.net | Links

    How to verify that string is in valid e-mail format

    by admin 16. April 2008 22:35

    The following code uses the static Regex.IsMatch method to verify that a string is in valid e-mail format.

    The IsValidEmail method returns true if the string contains a valid e-mail address and false if it does not, but takes no other action.

    You can use IsValidEmail to filter out e-mail addresses containing invalid characters before your application stores the addresses in a database or displays them in an ASP.NET page.

    bool IsValidEmail(string email)
    {

         return System.Text.RegularExpressions.Regex.IsMatch(email, @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
    }

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Tags:

    asp.net | c# | Regex

    Invoking server side code using AJAX and .ashx handlers for Virtual Earth

    by admin 14. April 2008 13:24

    Nice article about Ajax, Virtual Earth and Windows Live.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Tags:

    asp.net | Links | Windows Live | AJAX.net

    What Is Windows Live Delegated Authentication?

    by admin 11. April 2008 22:04

    Delegated Authentication is a new feature offered by Microsoft® that gives Windows Live ID users the ability to consent to the scoped release of their personal information to particular Web sites in a reliable yet flexible manner.

    Delegated Authentication is a way to permit access to personal information, but with more precise control over access and usage permissions than the current binary decision—that is, fully on or fully off—that comes with the generally bad practice of handing over your account credentials to another Web site.

    Data providers (also known as resource providers) such as the Windows Live Contacts service can register delegation offers that describe the access that a Web application or site (also known as an application provider) can request to a user’s data. The application provider can then request consent from the user by means of the Windows Live consent user interface (the consent UI) to one or more of those resource offers.

    Based on the consent decisions the user makes, Windows Live ID gives the application provider a consent token that enables the provider’s Web site to act on the user’s behalf to access the specified services for a period of time defined by the user.

    The consent token contains a delegation token, which authorizes a resource provider to provide scoped access to the user’s data in accordance with that user’s consent decisions, even when the user is not signed in. Stated another way, a delegation token enables application providers to act ”on behalf of” Windows Live ID users within the limits of both consent and constrained scope.

    Windows Live Delegated Authentication is both a powerful enabler of a new class of user-centered Web services, and also an opportunity for users to take back control of their own personal data and make informed decisions before releasing that data to other parties.

    You can read more about it here.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Tags:

    asp.net | Windows Live

    Reading web.config configuration section

    by admin 10. April 2008 08:27

    Code below helped when I wanted to read customErrors configuration section from web.config.  

    System.Configuration.Configuration configuration = System.Web.Configuration.WebConfigurationManager"~");
    System.Web.Configuration.CustomErrorsSection section = (System.Web.Configuration.CustomErrorsSection)configuration.GetSection("system.web/customErrors");

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5

    Tags:

    asp.net | c#

    Powered by BlogEngine.NET 1.4.5.0
    Theme by Mads Kristensen

    Calendar

    <<  March 2010  >>
    MoTuWeThFrSaSu
    22232425262728
    1234567
    891011121314
    15161718192021
    22232425262728
    2930311234

    View posts in large calendar