Thursday, August 9, 2012

Alter failed for Login sa. Cannot set a credential for principal 'sa'. - Error encountered in SQL Server

Alter failed for Login sa. Cannot set a credential for principal 'sa'. - Error encountered in SQL Server

Recently when i worked with SQL Server security, i encountered with one error while trying to modify 'SA' account properties. The exception details looks following,

http://paresh-sqldba.blogspot.com/2012/01/alter-failed-for-login-sa-cannot-set.html


Sunday, July 29, 2012

Scrape / download / get a webservice in a textbox or in variable c#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;

public partial class Default7 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //Your webservice...
        string url = "http://localhost:64907/WebSite2/rss.ashx";
        string strResult = "";

        WebResponse objResponse;
        WebRequest objRequest = System.Net.HttpWebRequest.Create(url);

        objResponse = objRequest.GetResponse();

        using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
        {
            strResult = sr.ReadToEnd();
            // Close and clean up the StreamReader
            sr.Close();
        }

        // Display results to a webpage
        //Response.Write(strResult);
        //webservice in textbox
        TextBox1.Text = strResult.ToString();
    }
}

Saturday, June 30, 2012

Friday, June 8, 2012

Using the ADF URL Data Control to Read RSS Feeds

http://www.oracle.com/technetwork/developer-tools/jdev/urldatacontrol-099677.html

Sunday, June 3, 2012

Oracle JDeveloper 11g Release 2 Tutorials - Consuming a Web Service from a Web Page

http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_14/jdtut_11r2_14.html

Friday, May 18, 2012

SOA documentation/downloads and samples

 Here is the link from which you can download, look at the official documentation as well as really good sample code and demos. This is a good starting point.



Thursday, May 17, 2012

Adding Maps Using the Maps Helper

Web Pages 2 includes additions to the ASP.NET Web Helpers Library, which is a package of add-ins for a Web Pages site. One of these is a mapping component provided by the Microsoft.Web.Helpers.Maps class. You can use the Maps class to generate maps based either on an address or on a set of longitude and latitude coordinates. The Maps class lets you call directly into popular map engines including Bing, Google, MapQuest, and Yahoo.

To use the new Maps class in your website, you must first install the version 2 of the Web Helpers Library. To do this, go to the instructions for installing the currently released version of the ASP.NET Web Helpers Library and install version 2.



http://www.asp.net/web-pages/overview/what's-new/top-features-in-web-pages-2#maphelper

Tuesday, May 15, 2012

LDAP Authentication in ASP.Net c#

in config file ..
  <authentication mode="Forms">
              <forms loginUrl="~/Account/LogOn" timeout="10"/>
        </authentication>                  



in code behind

 public  ValidateUser(string user, string pass)
        {
            bool validation;
            try
            {
                LdapConnection ldc = new LdapConnection(new LdapDirectoryIdentifier((string)null, false, false));
                NetworkCredential ncon = new NetworkCredential(user, pass, "DOMAINNAME");
                ldc.Credential = ncon;
                ldc.AuthType = AuthType.Negotiate;
                ldc.Bind(ncon); 
                validation = true;
            }
            catch (LdapException)
            {
                validation = false;
            }
            return validation;
        }

Friday, May 11, 2012

JD Edwards Defining a Hot Key in Your Application

To define a hot key, insert an ampersand before the letter that you want to set as the hot key in the Title property for the button that will have the hot key. You can set the definition from either the properties dialog or from the properties panel. The letter you define is then underlined in your application. Hot keys are governed by these rules:

  • You can define only one hot key for a button.

  • You cannot use the same hot key on more than one button in the same form or subform.

  • You cannot use a reserved hot key (any that is not in the list of application-defined hot keys).

  • You cannot insert more than one ampersand in the same button title.

  • You must check the Hot Key property for an exit definition only. Hot keys are enabled by default for push buttons.

    http://docs.oracle.com/cd/E17984_01/doc.898/e14706/hot_keys.htm#EOTFD00256

jd edwards Grid Control Events

To add columns to a grid control:
  1. Perform one of these tasks:
    • To add a data item to the grid from the BV associated with the form, double-click a data item in the Business View Columns Browser.
    • To add a data item to the grid that is not in the BV associated with the form, search for a data item in the Data Dictionary Browser, and then double-click it.
      Each time you double-click an item, Form Design Aid (FDA) adds it as a column to the grid control.
  2. Repeat step one until you have added all of the columns you need.
  3. Double-click the grid control.
  4. On Grid Properties, click the Columns tab and arrange the column order by selecting a column and then using the Up and Down buttons to shift its position in the list.
  5. Click the Sort Order tab and set the order in which the system will sort returned records by performing these steps:
    1. Select a data item in the Unsorted Columns list and click the right arrow. Repeat for each data item on which you want to sort.
      The data item moves to the Sorted Columns list.
    2. To toggle between displaying by ascending and descending order, click the data item in the Sorted Columns list.
      The letter A next to the data item indicates that the system will display records in ascending order. The letter D next to the data item indicates that the system will display records in descending order.
    3. Arrange the column sort order by choosing a column in the Sorted Columns list and then using the Up and Down buttons to shift its position in the list.
      http://docs.oracle.com/cd/E17984_01/doc.898/e14706/grid_controls.htm#g8d6ab57f7cedeaac_ef90c_10a77c8e3f7__7257