|
I am new to C#.net web applications but I have worked on C#.net desktop applications.
I am trying to determine what is the startup point is for a C#.net 2010 web application. In a desktop application, you can find a program.cs file that contains a static main method. H
However in the C#.net web application I am looking at, there is no program.cs file. Thus how can I tell what the startup file is? At least what is the main method I am looking for? If there are several main methods, which one am I looking for?
|
|
|
|
|
The entry point in an ASP.NET application is typically Default.aspx, though this can be configured in IIS (Internet Information Services, the standard web server to use with ASP.NET).
|
|
|
|
|
H,
I had used OLEDB provider to connect to DB2.When i run the code the system response is slow when connection is open.When i debug it hangs in connection ope.
Please suggest some code or idea
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.OleDb;
namespace Supply_Chain
{
public partial class _Default : System.Web.UI.Page
{
OleDbConnection conn = new OleDbConnection();
protected void Page_Load(object sender, EventArgs e)
{
string connString = @"Provider=IBMDADB2;Database=BBTFILEA;Uid=KSUNDER;Protocol=TCPIP;Port=23;Hostname=10.140.201.21;Pwd=welcome1;";
DataTable dt = new DataTable();
dt = DB2data(null, null, connString);
}
public DataTable DB2data(OleDbParameter[] Params, string spName, string connString)
{
DataSet ds = new DataSet();
using (OleDbConnection DBConn = new OleDbConnection(connString))
{
DBConn.Open();
Response.Write("CONNECTED TO DB2");
DBConn.Close();
}
return ds.Tables[0];
}
}
}
Regards
S.Guhananth
|
|
|
|
|
Hi,
I have a scenario like this.
I have two asynchronous service calls AsynchronousCal1 and AsynchronousCal2. And two response handlers ResponseHandler1 and ResponseHandler2. When AsynchronousCal1 finished ResponseHandler1 will be called. When AsynchronousCal2 finished ResponseHandler2 will be called.
Now I want to call a method "RunMethod" when the above two Response handlers completed.
The above two calls are asynchronous and I am calling them paralelly (Its mandatory for me to call them paralally), we are not sure which ResponseHandler will complete first and which ResponseHandler will complete second.
How to handle this situation in ASP.NET and C#?
Thanks in Advance.
|
|
|
|
|
Hi...
I have doing my project on investment mgt.In which i have to update equity share price so that i will helping my client by providing profit/loss information for his portfolio.But problem is that i have not connectivity with nse or bse.So on student level project can i get some free source for update so i will update my share price..If update will take + or - 5-10 min for update then its also fine.But I require free update link...
Please helping me..
|
|
|
|
|
No you cannot get it free..
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
Yes you can.
You need to do a little process which is that you need to import market price dailybasis.
Where you can get Daily Market Price?
For this you need to open site for NSE or BSE and there is a link for download daily market price after market close.
www.bseindia.com/mktlive/bhavcopy.asp[^]
www.nseindia.com/archives/archives.htm[^]
you can easily import these files to your database.
Maulik Dusara
Sr. Sofware Engineer
I love it when a plan comes together
|
|
|
|
|
hi i am a new user of asp.net
in php i can show direct value but how i can do this with asp.net there is lot of news on my database i would like to show all news on my page between the marquee tag like most sites have..
how i will show will u provide code to show message..
thanks
|
|
|
|
|
|
<
div class="newsmatter">
<marquee behavior="alternate" direction="up" height="200px">
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table cellpadding="1" cellspacing="3" width="99%" style="text-align:justify" >
</HeaderTemplate>
<ItemTemplate>
<tr>
<td style="color:Black " >
<%#DataBinder.Eval(Container.DataItem,"Newscontent")%>
</tr>
<tr style="height:10px;">
<td >
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table></FooterTemplate>
</asp:Repeater>
</marquee>
</div
>
|
|
|
|
|
|
Hi,
We are trying to connect to DB2 from .Net via IBM DB2 Data provider. We are not able to establish the connection using the CFWEBUSER profile created.
We are checking for other options to establish the connection.
Tried checking the CFWEBUSER Profile directly in DB2 box. We have limitations in using the queries using the CFWEBUSER As400 profile. We have “Start Structured Query Language (STRSQL)” command in AS400 which starts the interactive SQL program to write the SQL queries. I’m not able to access this command using the profile mentioned.
Any Db2 guys here,,,,,,,,,what is CFWEBUSER profile.
Thanks
Guhananth.S
|
|
|
|
|
Hi i m using paypal IPN for payment notifications. I am using the same code provided by Paypal however i m having issues. Here is the code
string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr";
string strLive = "https://www.paypal.com/cgi-bin/webscr";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox);
//Set values for the request back
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength);
string strRequest = Encoding.ASCII.GetString(param);
Dictionary<string, string=""> nvs = new Dictionary<string, string="">();
string[] items = strRequest.Split("&".ToCharArray());
foreach (string item in items)
{
string[] parts = item.Split("=".ToCharArray());
nvs.Add(parts[0], HttpUtility.UrlDecode(parts[1]));
}
strRequest += "&cmd=_notify-validate";
req.ContentLength = strRequest.Length;
//for proxy
//Hook up 1&1 proxy server
//WebProxy proxy = new WebProxy("ntproxyus.lxa.perfora.net:3128",false);
//req.Proxy = proxy;
//Send transaction detail with the flag back to PayPal
StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
streamOut.Write(strRequest);
streamOut.Close();
//DataLayer dl3 = new DataLayer();
//dl3.executeQuery("Update petOwner set orderStatus = 'Afterproxy(Invalid Card)' where orderId = '" + Request.Form["item_name"] + "'");
//Get validation status from PayPal
StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
string strResponse = streamIn.ReadToEnd();
streamIn.Close();
//DataLayer dl4 = new DataLayer();
//dl4.executeQuery("Update petOwner set orderStatus = 'Afterproxy2(Invalid Card)' where orderId = '" + Request.Form["item_name"] + "'");
if (strResponse == "VERIFIED")
{
//check the payment_status is Completed
if (nvs["payment_status"] == "Completed")
{
//check that txn_id has not been previously processed
//check that receiver_email is your Primary PayPal email
//check that payment_amount/payment_currency are correct
//process payment
DataLayer dl = new DataLayer();
dl.executeQuery("Update petOwner set orderStatus = 'Paid' where orderId = '" + Request.Form["item_name"] + "'");
CheckPaymentMode();
SendOrderEmail();
}
}
else if (strResponse == "INVALID")
{
DataLayer dl = new DataLayer();
dl.executeQuery("Update petOwner set orderStatus = 'Not Paid(Invalid Card)' where orderId = '" + Request.Form["item_name"] + "'");
//log for manual investigation
}
else
{
DataLayer dl = new DataLayer();
dl.executeQuery("Update petOwner set orderStatus = 'Not Paid(Invalid Card)' where orderId = '" + Request.Form["item_name"] + "'");
//log response/ipn data for manual investigation
}
}
The code is working fine untl this line of code
StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
streamOut.Write(strRequest);
streamOut.Close();
When it comes to send request to paypal. from here on no line of code gets executed.
I ve contacted the hosting company they are saying no proxy is needed to send request.
I am unable to trace the issue. Need urgent help
Thanks in Advance,
Asfand
|
|
|
|
|
Please put your code in <pre> tags so that it's readable. (Use the "code" formatting.)
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
hi
i want create chat room on my site please guide me
|
|
|
|
|
|
hi
how do i send Message ,
broadcasting to update all clients
|
|
|
|
|
It's depend on your implementation because you didn't specify anything like are you using any Messaging Server OR Have you implemented it's own? OR you want to implement it both Server and Client?
Parwej Ahamad
|
|
|
|
|
you also need to specify that this is Windows or Web application. and also you need to show what you have implemented for this.
Maulik Dusara
Sr. Sofware Engineer
I love it when a plan comes together
|
|
|
|
|
I am in the processing of trying to run a C # asp.net 2010 web application from my workstation so I can understand it and add my own webpages to the application. However to get this application to run, I am trying to determine what the following values should be in the web.config file:
^<appSettings>
<add key="ReportViewerServerConnection" value="" />
<add key="ReportViewerUser" value="" />
<add key="ReportViewerPassword" value="" />
<add key="ReportViewerDomain" value="" />
<add key="ReportServerUrl" value="" />
<add key="ReportsPath" value="" />
</appSettings>^
Let me know if the following settings are correct and/or what would you recommend?
^
<add key="ReportViewerUser" value=general company name? />
<add key="ReportViewerPassword" value=general company value />
<add key="ReportViewerDomain" value=general company domain or report server doamian?/>
<add key="ReportServerUrl" value="http://localhost/reportserver" />
<add key="ReportsPath" value="" />^
where would this reports path be on my local workstation?
NOTE: I have C#.net 2008 desktop experience, but this is the first time I am working on anasp.net 2010 application.
|
|
|
|
|
i am developing sending bulk mail in asp.net using C#....how to send mail without internet connection...Is There any code in C# for sending bulk mail without internet connection...(intranet to internet)
|
|
|
|
|
How do you expect your mail messages to be delivered without internet connection? Without a communications link to the mail server, and from there to all the mail receivers, it is not possible.
|
|
|
|
|
I think the question is about sending mail from a machine that itself doesn't have an internet connection, but does have an intranet connection.
If so, all it needs is another machine on the intranet with an internet connection and run an SMTP server or relay on it.
|
|
|
|
|
Maybe you should have posted this information to OP.
|
|
|
|