ASP Oracle Connection Error - asp.net

I've wrote some connection code in asp for oracle. Its working fine from server A.
When I tried same code from server B it give me error.
Here is the stack trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Oracle.DataAccess.Client.OracleConnection.Open() +9007
WebApplication4.Login.submit_Click(Object sender, EventArgs e) +238
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9633194
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
I'm using oracle data access dll. Its version is v2.0.50727.
I downloaded it from nuget.

Run your code using:
Debug mode
Check connection string if empty
Access your database manually to simulate the error

Related

Adwords API error: ReportDownloadError.INVALID_VERSION. c# client library

I'm trying to get the .NET client library code samples to return a criteria performance report but can't get the code to function. I'm getting an error when clicking the "Download Criteria Report button" on the AdWords.Examples.CSharp.OAuth test page.
The error is as following:
System.Net.HttpWebRequest.GetResponse() +1399
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String downloadUrl, String postBody) in C:\Development\Projects\google.adwords.api\src\AdWords\Util\Reports\New\ReportUtilities.cs:183
[AdWordsReportsException: AdWordsReportsException: One or more AdWords Report download errors have occurred.
ReportDownloadError.INVALID_VERSION. (Error: ReportDownloadError.INVALID_VERSION, FieldPath: , Trigger: )]
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String downloadUrl, String postBody) in C:\Development\Projects\google.adwords.api\src\AdWords\Util\Reports\New\ReportUtilities.cs:204
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.GetReport() in C:\Development\Projects\google.adwords.api\src\AdWords\Util\Reports\New\ReportUtilities.cs:166
Google.Api.Ads.Common.Util.Reports.AdsReportUtilities.GetResponse() in C:\Development\Projects\google.adwords.api\src\Common\Util\Reports\AdsReportUtilities.cs:162
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.GetResponse() in C:\Development\Projects\google.adwords.api\src\AdWords\Util\Reports\New\ReportUtilities.cs:310
Google.Api.Ads.AdWords.Examples.CSharp.OAuth.Default.OnDownloadReportButtonClick(Object sender, EventArgs eventArgs) in C:\Development\Projects\google.adwords.api\examples\AdWords\csharp\oauth\Default.aspx.cs:100
[ApplicationException: Failed to download report.]
Google.Api.Ads.AdWords.Examples.CSharp.OAuth.Default.OnDownloadReportButtonClick(Object sender, EventArgs eventArgs) in C:\Development\Projects\google.adwords.api\examples\AdWords\csharp\oauth\Default.aspx.cs:104
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9712662
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639
What am i missing or doing wrong?
My main goal is to retrieve an XML feed that i can display on a webpage.
Any clues ?
which version are you using?
if you are using old version, update them.
Here is Deprecation Schedule.
https://developers.google.com/adwords/api/docs/sunset-dates

Oracle Data Access ıClient Error

My pc windows 2012 server, 64 bit and oracle 12 c client is 32 bit. I am also using IIS. All options are done. I can access my web applications and getting data from database.
However, when I try to add something to database, it is giving error. It is not about tnsnames, connectionstring. The error is:
Exception Details: Oracle.DataAccess.Client.OracleException:
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[OracleException (0x80004005)] Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable) +1508
Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) +51
Oracle.DataAccess.Client.OracleConnection.Open() +5235
BMS.WebForm1.Button1_Click(Object sender, EventArgs e) +92
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9615682
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
Here is the Connection code
using Oracle.DataAccess.Client;
. . . . .
string oradb = "DATA SOURCE=bms;PASSWORD=training;USER ID=training;";
OracleConnection con = new OracleConnection(oradb);
con.Open();
MyMessageBox("connected!");
con.Close();

Access is denied when trying to open an exe application from a website

In my website, I tried to open a windows application (.exe) upon a button click. But it showing "Access is denied".
Stack trace:
[Win32Exception (0x80004005): Access is denied]
System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +614
System.Diagnostics.Process.Start() +56
ghs.btnTry_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\ddrivestudio.com\httpdocs\tanishq\ghs.aspx.cs:19
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Button click event:
Process p = new Process();
p.StartInfo.FileName = Request.MapPath("~/App/App1.exe");
p.Start();
Hope the following links already have an answer.
Reference:
1.Which permissions are required to enable process.start via asp.net application?
2. Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

argumentnullexception was unhandled by user code

In an ASP.NET application while uploading data from an excel sheet to website im getting the error
System.ArgumentNullException: Value cannot be null.
Source Error:
Line 161: LHSupdate.Name = AssociateName;
Line 162:
Line 163: var designation = dsData.Tables["LHS"].AsEnumerable().Where(r => Convert.ToString(r["Associate Id"]).Trim() == LHSupdate.AssciateID.Trim());
Line 164:
Line 165: if (designation != null)
Source File: D:\GENIUS\LHS\LHS\UpdateLHS.aspx.cs Line: 163
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: source]
System.Data.DataTableExtensions.AsEnumerable(DataTable source) +34903
LHS.Login.btnfileUplode_Click(Object sender, EventArgs e) in D:\GENIUS\LHS\LHS\UpdateLHS.aspx.cs:163
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
What should i do to run succesfully.
Please advice further

Unknown error When Starting java.exe from an ASP.NET Application

On these lines of code:
// Run compiler
Process p = System.Diagnostics.Process.Start("java.exe", ex);
p.WaitForExit();
We get this error:
Server Error in '/' Application.
Unknown error (0xfffffffe)
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.ComponentModel.Win32Exception: Unknown error (0xfffffffe)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Win32Exception (0x80004005): Unknown error (0xfffffffe)]
System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +912
System.Diagnostics.Process.Start() +136
System.Diagnostics.Process.Start(ProcessStartInfo startInfo) +49
Arcade.UploadFunctions.minifyC2Runtime(Int32 GameID) +333
Arcade.GameFunctions.createGame(Int32 CatID, String Name, String Description, String Instructions, Int32 UserId, Int32 Width, Int32 Height, Int32 ParentGameID) +1338
ArcadeSubmit.submitGame(Object sender, EventArgs e) +1329
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
As noted in my other question it would appear this is a permissions error. However, this error disappears if I recycle my app pool. It then starts throwing this error again within a couple of hours or so.
The apppool in question is running with LocalService identity. Anyone know what would be causing this to break?
Edit: More details error from event viewer
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2/29/2012 8:15:12 AM
Event time (UTC): 2/29/2012 8:15:12 AM
Event ID: 6b5770960c4f41b1a9ba10045b7b50d4
Event sequence: 131746
Event occurrence: 480
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT-26-129749512365140162
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\Scirra\
Machine name: WIN-MT04GJ7U5CB
Process information:
Process ID: 8276
Process name: w3wp.exe
Account name: NT AUTHORITY\LOCAL SERVICE
Exception information:
Exception type: Win32Exception
Exception message: Unknown error (0xfffffffe)
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Arcade.UploadFunctions.minifyC2Runtime(Int32 GameID)
at Arcade.GameFunctions.createGame(Int32 CatID, String Name, String Description, String Instructions, Int32 UserId, Int32 Width, Int32 Height, Int32 ParentGameID)
at ArcadeSubmit.submitGame(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: http://www.scirra.com/ArcadeSubmit.aspx
Request path: /ArcadeSubmit.aspx
User host address: [censored]
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\LOCAL SERVICE
Thread information:
Thread ID: 5
Thread account name: NT AUTHORITY\LOCAL SERVICE
Is impersonating: False
Stack trace: at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Arcade.UploadFunctions.minifyC2Runtime(Int32 GameID)
at Arcade.GameFunctions.createGame(Int32 CatID, String Name, String Description, String Instructions, Int32 UserId, Int32 Width, Int32 Height, Int32 ParentGameID)
at ArcadeSubmit.submitGame(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:

Resources