Question : Open Sharepoint server's pdf file in asp.net...

Hi,

Want to Open a pdf file in asp.net  which is in the sharepoint server..
I 've used the code below...


            System.Net.WebClient client = new System.Net.WebClient();

            string path = "http://hawaii:9999/Functions/HumanResource/HR/Employee%20Handbook/GE%20Emp%20Handbook.pdf";

            Byte[] buffer = client.DownloadData(path);

            if (buffer != null)
            {
                Response.ContentType = "application/pdf";
                Response.AddHeader("content-length", buffer.Length.ToString());
                Response.BinaryWrite(buffer);
            }
Then its giving exception like

The remote server returned an error: (401) Unauthorized.

what to do to solve this problem..

Answer : Open Sharepoint server's pdf file in asp.net...

Hello,

You cannot disable indexes. They can be dropped or made unusable. I am sure you are referring to contraints.

Here is how you find out the name of the index on table EMP:
SQL> select index_name,uniqueness from dba_indexes where table_name='EMP';
INDEX_NAME                     UNIQUENES
------------------------------ ---------
EMP_ID_IX                          NONUNIQUE

SQL> select constraint_name,index_name, constraint_type from dba_constraints
          where table_name='EMP' and constraint_type='P';

CONSTRAINT_NAME          INDEX_NAME          C
------------------------------ ------------------------- -
PK_EMP_ID                         EMP_ID_IX                P

You can then disable the constraint as follows:
SQL> alter table scott.emp DISABLE constraint pk_emp_id;

You can also drop an index using
SQL> drop index <index_name>;

Regards.
Shahid.
Random Solutions  
 
programming4us programming4us