locked
error message: Failure creating file. while connection excel file on server. RRS feed

  • Question

  • User1895342976 posted

    hi Regards Mike

    I changed te your says;

    <add name="excelbaglantiyeni" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=//mysitei.com/App_Data/seyit.xls; Extended Properties= Excel 8.0"

    providerName="System.Data.SqlClient"/>

    and I tryed connection string 

    <add name="excelbaglantiyeni" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=//mysitei.com/seyit.xls; Extended Properties= Excel 8.0" providerName="System.Data.SqlClient"/>

    but mysite gives error

    Server Error in '/' Application.

    Failure creating file.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.OleDb.OleDbException: Failure creating file.

    Source Error:

    Line 67:     protected void Page_Load(object sender, EventArgs e)
    Line 68:     {
    Line 69:         baglanexc.Open();
    

     

    please help me. that error why become.I dont understand its reason

    <FIELDSET><LEGEND>C:/inetpub/vhosts/mysite.com/httpdocs/App_Data/seyit.xls</LEGEND>
    <script language=javascript src="/javascript/editlist.js" type=text/javascript></script>
    Group or user names
    <INPUT type=hidden value=Group name=type_input autocomplete="off"> <SELECT id=user_name_input style="WIDTH: 100%; max-width: 100%" onchange="return psaEditLists[0].onInputChange(1);"><OPTION value=NITEL-6413370\FPSE_24250 selected>FPSE_24250</OPTION></SELECT>
    <INPUT type=hidden value=Group name=type[] autocomplete="off"> Administrators<INPUT type=hidden value=BUILTIN\Administrators name=user_name[] autocomplete="off">
    <INPUT type=hidden value=User name=type[] autocomplete="off"> Plesk Domain User (golcicom)<INPUT type=hidden value=NITEL-6413370\golcicom name=user_name[] autocomplete="off">
    <INPUT type=hidden value=User name=type[] autocomplete="off"> Plesk FTP User (golcuk)<INPUT type=hidden value=NITEL-6413370\golcuk name=user_name[] autocomplete="off">
    <INPUT type=hidden value=User name=type[] autocomplete="off"> Plesk IIS User (IUSR_golcicom)<INPUT type=hidden value=NITEL-6413370\IUSR_golcicom name=user_name[] autocomplete="off">
    <INPUT type=hidden value=User name=type[] autocomplete="off"> Plesk IIS WP User (IWAM_plesk(default))<INPUT type=hidden value=NITEL-6413370\IWAM_plesk(default) name=user_name[] autocomplete="off">
    <INPUT type=hidden value=User name=type[] autocomplete="off"> SYSTEM<INPUT type=hidden value="NT AUTHORITY\SYSTEM" name=user_name[] autocomplete="off">
    <script> var permissions_userlist_columns = new Array(); permissions_userlist_columns[0] = new Array(); permissions_userlist_columns[0]['size'] = 0; permissions_userlist_columns[0]['name'] = 'type'; permissions_userlist_columns[0]['text'] = ''; permissions_userlist_columns[0]['type'] = 'const'; permissions_userlist_columns[0]['value'] = new Array('', ''); permissions_userlist_columns[0]['editable'] = false; permissions_userlist_columns[0]['required'] = false; permissions_userlist_columns[0]['primary'] = false; permissions_userlist_columns[0]['check'] = null; permissions_userlist_columns[1] = new Array(); permissions_userlist_columns[1]['size'] = 100; permissions_userlist_columns[1]['name'] = 'user_name'; permissions_userlist_columns[1]['text'] = 'Group or user names'; permissions_userlist_columns[1]['type'] = 'select'; permissions_userlist_columns[1]['value'] = new Array(); permissions_userlist_columns[1]['value'][0] = new Array('BUILTIN\\Administrators', 'Administrators', true); permissions_userlist_columns[1]['value'][1] = new Array('NITEL-6413370\\FPSE_24250', 'FPSE_24250', true); permissions_userlist_columns[1]['value'][2] = new Array('NITEL-6413370\\golcicom', 'Plesk Domain User (golcicom)', true); permissions_userlist_columns[1]['value'][3] = new Array('NITEL-6413370\\golcuk', 'Plesk FTP User (golcuk)', true); permissions_userlist_columns[1]['value'][4] = new Array('NITEL-6413370\\IUSR_golcicom', 'Plesk IIS User (IUSR_golcicom)', true); permissions_userlist_columns[1]['value'][5] = new Array('NITEL-6413370\\IWAM_plesk(default)', 'Plesk IIS WP User (IWAM_plesk(default))', true); permissions_userlist_columns[1]['value'][6] = new Array('NT AUTHORITY\\SYSTEM', 'SYSTEM', true); permissions_userlist_columns[1]['onChange'] = oC_user_name; permissions_userlist_columns[1]['editable'] = false; permissions_userlist_columns[1]['required'] = true; permissions_userlist_columns[1]['primary'] = true; permissions_userlist_columns[1]['check'] = null; var permissions_userlist_data = new Array(); var permissions_userlist_can_delete = new Array(); var permissions_userlist_additional_data = new Array(); permissions_userlist_data[0] = new Array(new Array('Group', ''), 'BUILTIN\\Administrators'); permissions_userlist_can_delete[0] = false; permissions_userlist_additional_data[0] = new Array(true, true, true, true, true, true, false, false, false, false, false, true, true, true, true, true, false, false, false, false, false); permissions_userlist_data[1] = new Array(new Array('User', ''), 'NITEL-6413370\\golcicom'); permissions_userlist_can_delete[1] = false; permissions_userlist_additional_data[1] = new Array(true, true, true, true, true, true, false, false, false, false, false, true, true, true, true, true, false, false, false, false, false); permissions_userlist_data[2] = new Array(new Array('User', ''), 'NITEL-6413370\\golcuk'); permissions_userlist_can_delete[2] = true; permissions_userlist_additional_data[2] = new Array(false, false, false, false, true, true, false, false, false, false, false, true, true, true, true, true, false, false, false, false, false); permissions_userlist_data[3] = new Array(new Array('User', ''), 'NITEL-6413370\\IUSR_golcicom'); permissions_userlist_can_delete[3] = true; permissions_userlist_additional_data[3] = new Array(false, true, true, true, true, true, false, false, false, false, false, true, true, true, true, true, false, false, false, false, false); permissions_userlist_data[4] = new Array(new Array('User', ''), 'NITEL-6413370\\IWAM_plesk(default)'); permissions_userlist_can_delete[4] = true; permissions_userlist_additional_data[4] = new Array(false, false, false, false, true, false, false, false, false, false, false, true, true, true, true, true, false, false, false, false, false); permissions_userlist_data[5] = new Array(new Array('User', ''), 'NT AUTHORITY\\SYSTEM'); permissions_userlist_can_delete[5] = false; permissions_userlist_additional_data[5] = new Array(true, true, true, true, true, true, false, false, false, false, false, true, true, true, true, true, false, false, false, false, false); var permissions_userlistEditListObj = new psaEditList('permissions_userlist', true); permissions_userlistEditListObj.setColumns(permissions_userlist_columns); permissions_userlistEditListObj.setAllData(permissions_userlist_data, permissions_userlist_can_delete); permissions_userlistEditListObj.setAllAdditionalData(permissions_userlist_additional_data); permissions_userlistEditListObj.setAddIcon('/skins/winxp.new.compact/icons/list_item_add.gif', 16, 16); permissions_userlistEditListObj.setAddDisabledIcon('/skins/winxp.new.compact/icons/list_item_add-disabled.gif', 16, 16); permissions_userlistEditListObj.setDelIcon('/skins/winxp.new.compact/icons/list_item_remove.gif', 16, 16); permissions_userlistEditListObj.setDelDisabledIcon('/skins/winxp.new.compact/icons/list_item_remove-disabled.gif', 16, 16); permissions_userlistEditListObj.setSelectable(true, onChangeSelection); permissions_userlistEditListObj.setOnNewElement(onNewElement); permissions_userlistEditListObj.setOnDeleteElement(onDeleteElement); permissions_userlistEditListObj.render('permissions_userlist'); </script>
    Permissions for IUSR_golcicom Allow Deny
    Full Control <INPUT class=checkbox onclick="oC_perm('AllowFullControl');" type=checkbox CHECKED value=true name=AllowFullControl autocomplete="off"> <INPUT class=checkbox onclick="oC_perm('DenyFullControl');" type=checkbox value=true name=DenyFullControl autocomplete="off">
    Modify <INPUT class=checkbox onclick="oC_perm('AllowModify');" type=checkbox CHECKED value=true name=AllowModify autocomplete="off"> <INPUT class=checkbox onclick="oC_perm('DenyModify');" type=checkbox value=true name=DenyModify autocomplete="off">
    Read & Execute <INPUT class=checkbox onclick="oC_perm('AllowReadAndExecute');" type=checkbox CHECKED value=true name=AllowReadAndExecute autocomplete="off"> <INPUT class=checkbox onclick="oC_perm('DenyReadAndExecute');" type=checkbox value=true name=DenyReadAndExecute autocomplete="off">
    Read <INPUT class=checkbox onclick="oC_perm('AllowRead');" type=checkbox CHECKED value=true name=AllowRead autocomplete="off"> <INPUT class=checkbox onclick="oC_perm('DenyRead');" type=checkbox value=true name=DenyRead autocomplete="off">
    Write <INPUT class=checkbox onclick="oC_perm('AllowWrite');" type=checkbox CHECKED value=true name=AllowWrite autocomplete="off"> <INPUT class=checkbox onclick="oC_perm('DenyWrite');" type=checkbox value=true name=DenyWrite autocomplete="off">

    <BUTTON id=buttonid-permissions-advanced name=bname_permissions_advanced>Advanced</BUTTON>Advanced
    <INPUT type=hidden value="C:/inetpub/vhosts/mysite .com/httpdocs/App_Data/seyit.xls" name=fname autocomplete="off"> <INPUT type=hidden name=data autocomplete="off">
    </FIELDSET>

     

     

     

     

    <?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"> <v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id=_x0000_i1025 style="WIDTH: 585pt; HEIGHT: 306pt" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\01\clip_image001.png"></v:imagedata></v:shape>

     

    Thursday, July 31, 2008 7:16 PM

Answers

  • User-821857111 posted

    You would have to ask your web host that question.  It's a PHP error, not an ASP.NET error.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 1, 2008 3:47 PM

All replies

  • User-821857111 posted

    You have duplicated the Provider part of the connection string as part of the path to the file. Not only that, but you have specified the wrong providerName. Unset full file permissions on the folder now (it's a security risk), then move the .xls file to the App_Data folder.  Apply MODIFY permissions on the App_Data folder to the NETWORK SERVICE account, then use this connection string:

    <add name="excelbaglantiyeni"  connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|seyit.xls; Extended Properties= Excel 8.0"
    providerName="System.Data.OleDb"/>


    Friday, August 1, 2008 7:45 AM
  • User-821857111 posted

    You are still using the wrong provider name - despite the fact that you have edited your post and then posted your issue again.....

     

    Friday, August 1, 2008 12:18 PM
  • User1895342976 posted

    I must gives httpdocs permission read and write

    using plesk control panel I set permission httpdocs's folder on host

    plesk panel give me error;

    FileManager::get_file_info_wrapper() failed: filemng util failed: Unable to get the object (C:/inetpub/vhosts/golcukdersaneleri.com/httpdocs/httpdocs) security info: (2) The system cannot find the file specified.
    ---------------------- Debug Info -------------------------------
    0: C:\Program Files\SWsoft\Plesk\admin\plib\common_func.php3:151
     psaerror(string 'FileManager::get_file_info_wrapper() failed: filemng util failed: Unable to get the object (C:/inetpub/vhosts/golcukdersaneleri.com/httpdocs/httpdocs) security info: (2) The system cannot find the file specified.')
    1: C:\Program Files\SWsoft\Plesk\admin\htdocs\domains\webdirs\webdir_permissions.php:51

     I wonder whether errors's reason can become

     

     

    Friday, August 1, 2008 1:58 PM
  • User-821857111 posted

    You would have to ask your web host that question.  It's a PHP error, not an ASP.NET error.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 1, 2008 3:47 PM