title speaks for itself,
db.ExecuteCommand('INSERT INTO tCSVFile(fileName, fileContent, mimetype, timeCreated) VALUES({0}, {1}, {2}, {3})', filename, EncodeTo64(CreateCSVFile(header, rows)), 'text/csv', DateTime.Now );
this works fine from the virtual server but on iis inserting causes nothing to happen.
Also tried this..
tCSVFile c = new tCSVFile { fileContent = EncodeTo64(CreateCSVFile(header, rows)), fileName = filename, mimetype = 'text/csv', timeCreated = DateTime.Now }; db.tCSVFiles.InsertOnSubmit(c); db.SubmitChanges();
again works on virtual server but on iis no luck. any help would be greatly appreciated as i have looked on the web and havent found anything of use. My selects work fine and can select without a problem.
Connection string is
<add name='db_ac_motors_testConnectionString' connectionString='Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\db_ac_motors_test.mdf;Integrated Security=True;User Instance=True' providerName='System.Data.SqlClient' />
The insert is a call from a MVC Partial view and is done through ajax.beginform()
After finally spending couple hours looking for some sort of exception I saved the stack trace in an event log and found this error
So with some fishing around the internet it had to do with a user permission restriction.
here is a link if anyone runs into the same problem. I guess the debugging virtual server reads folder permissions differently hence the restriction only on deployment(IIS is a little fussy when it comes to permissions). And I was surprised that no exception was being returned…I had to do so much to access the stack trace, I don’t want to even begin… Anyways the link is this just follow the steps and it should point you in the right direction.
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/2e776fb4-6df9-4a11-96f1-948b8a2f839a/#page:2