|
I have completed an aspx application, which I wanted to provide the url for testing from my system. Means, the testers need to access my local system for testing the application.
Since I'm getting the url as http://localhost:(routing number)/directory/Default.aspx, I cannot give this url to them as they cannot access it. I tried to put my IP Address and computer name also, but it fails.
I published the site, and then provide the link. But I am getting an xml parser error: not well formed. It was not happening locally when I run from my system. How to solve this? How to provide the url?
Can anybody please help?
Thanks
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
meeram395 wrote: Since I'm getting the url as http://localhost:(routing number)/directory/Default.aspx, I cannot give this url to them as they cannot access it. I tried to put my IP Address and computer name also, but it fails.
I published the site, and then provide the link. But I am getting an xml parser error: not well formed. It was not happening locally when I run from my system. How to solve this? How to provide the url?
You have to create a Virtual Directory in IIS for your web application. After Deploying the web application it can be accessible in your network using IP address like
http://yourip/directory/default.aspx.
Step1: Install IIS in your system/ server.
Step 2 : Create Virtual Directory for that web application
Step3 : Set the default page,authentication mode and most importantly .Net framework version.
Read this article.[^]
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
if you syste/server don't install iis or .Net framework, At first ,you must install it's.
The .Net framework version and you application version must samed.About application version,you will look for application directory web.config file.
|
|
|
|
|
Thanks. It worked well. I performed all the above steps and it is working fine now.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
i want full file in database not only file name how can we do it.
|
|
|
|
|
you want export excel file from database, example application in this web,you'll search keyword of database to excel. I do it also.
|
|
|
|
|
Hi,
I write connection coding in Web config file.
The code is
<connectionstrings>
<add name="conn" connectionstring="Data Source=techdbserver;Initial Catalog=project;<br mode=" hold=" /> user name=sa;password=sa;<br mode=" providername="System.Data.SqlClient">
When i called it in the web form as
con = new SqlConnection(ConfigurationManager.ConnectionString["conn"].ConnectionString);
the following error appears.
'System.Configuration.ConfigurationManager' does not contain a definition for 'ConnectionString'
Can any one tell whats the error?
|
|
|
|
|
Hi,
You have not posted the code you wrote in Web.config file.
Secondly Please note and correct the syntax for accessing the connection string from web config in C#
con = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
Thanks
Padmanabh
|
|
|
|
|
<br />
con = new SqlConnection(ConfigurationManager.ConnectionString["conn"].ConnectionString);<br />
This code contain two 'ConnectionString', So error appears does not contain a definition for 'ConnectionString'
it's right:
<br />
con = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);<br />
|
|
|
|
|
very easy.
Don't use the ConnectionStrings.
Use ConfigurationManager.AppConfig["myconn1"]
|
|
|
|
|
Dear All,
I have a web application from which I need to send an UDP datagram.
When I send the data through Synchronous mode it is working fine.
When I use asynchronous operation it is throwing the below error:
"A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied "
The code used is:
Asynchronous:
senderOfMessage = new UdpClient();
IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Parse(serverIP), Convert.ToInt32(serverPort));
byte[] message = ASCIIEncoding.ASCII.GetBytes("Test Message");
senderOfMessage.BeginSend(message, message.Length, new AsyncCallback(OnSend), remoteEndPoint);
Synchronous:
Kindly help me to get rid of this issue.
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
What are you trying to achieve by using UDP in a ASP.NET application?
|
|
|
|
|
Dear Navaneeth,
I have to send a message to a windows service, the windows service in turn sends a message to another external application which is not developed in .Net.
For sending the message to external application it used the UDP, so the same UDP is used o receive the message from the web application too in the window service.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi,
I uploaded my excel file into a folder(server), now i want to read that file from the folder, than i have to insert that excel into a database with same filds,
I have done this but from local system i can able to read a file not from the uploaded folder.
So how to read a excel file from folder....
Below code is the one i have used from local system, the connections string
String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:/valuefirst.xls';Extended Properties=Excel 8.0"; (its working)
How to take this excel sheet from server folder.
Pls help me,
thanx
krishna
|
|
|
|
|
krishnavaradharajan wrote: I have done this but from local system i can able to read a file not from the uploaded folder.
You can write a page that takes an id and feeds the excel file to the client from your DB.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for ur reply.....
the connection string wht i given was this..
String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='
c:/valuefirst.xls ';Extended Properties=Excel 8.0"; (its working)
Aboue connection string is for reading from localsystem, so if i want to read from server folder the link wht can i give in Data Source.
And i tryed by giving complete link like below..
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=http://justmypixels.com/escorts/sms/sms.xls; Extended Properties=Excel 8.0";
It was showing the error like "Invalid internet address."
Can u pls short this out....
Thanx
krishna
|
|
|
|
|
String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:/valuefirst.xls';Extended Properties=Excel 8.0"; (its working)
This file working from local system, but uploaded to server folder happened error,
1.Don't find file, Data Source path is error, you'll use server map path.
2.is it Uploaded file in folder?check this file.
|
|
|
|
|
Procedure or Function 'SubmitRecord1' expects parameter '@ID', which was not supplied.this is the error i am getting while insert into data base using stored procedure can any body help me plz...
|
|
|
|
|
NRHSR wrote: Procedure or Function 'SubmitRecord1' expects parameter '@ID', which was not supplied
How can an error message be more clear?
|
|
|
|
|
pass parameter '@ID' value to Procedure or Function 'SubmitRecord1'
Mahendra Bisht.
|
|
|
|
|
I recommend a job at McDonalds. It seems that computing is too hard for you. The error means what it says.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
"What do you mean, 'I din't give you any fries?'
Nah - too complex.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Procedure or Function 'SubmitRecord1' expects parameter '@ID', which was not supplied. this is the exception i am getting when i run.and my code is
protected void Submit1_ServerClick(object sender, EventArgs e)
{
string constr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True";
SqlConnection con = new SqlConnection(constr);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd = new SqlCommand("SubmitRecord1", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter sp1 = new SqlParameter("@ID",SqlDbType.NVarChar,10);
sp1.Value = TextBox1.Text;
SqlParameter sp2 = new SqlParameter("@Password",SqlDbType.NVarChar,50);
sp2.Value = TextBox2.Text;
SqlParameter sp3 = new SqlParameter("@ConfirmPassword",SqlDbType.NVarChar,50);
sp3.Value = TextBox3.Text;
SqlParameter sp4 = new SqlParameter("@EmailID",SqlDbType.NVarChar,200);
sp4.Value = TextBox4.Text;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
//cmd.ExecuteNonQuery();
}
my stored procedure is
CREATE PROCEDURE dbo.SubmitRecord1
(
@ID varchar(10),
@Password varchar(50),
@ConfirmPassword varchar(50),
@EmailID varchar(200)
)
AS
INSERT INTO login1(ID,Password,ConfirmPassword,EmailID)VALUES(@ID,@Password,@ConfirmPassword,@EmailID)
RETURN
i am passing parameter ... then also its throwing exception......
can any body help me ...
|
|
|
|
|
You're not adding any of the parameters to the command object
something like
cmd.Parameters.Add(sp1);
(Look it up - I don't have an example in front of me - but that's the issue here - upir cmd object doesn't know about the parameters.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
protected void Submit1_ServerClick(object sender, EventArgs e)
{
string constr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True";
SqlConnection con = new SqlConnection(constr);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd = new SqlCommand("SubmitRecord1", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@ID", SqlDbType.NVarChar,10).Value = TextBox1.Text;
cmd.Parameters.Add("@Password", SqlDbType.NVarChar, 50).Value = TextBox2.Text;
cmd.Parameters.Add("@ConfirmPassword", SqlDbType.NVarChar, 50).Value = TextBox3.Text;
cmd.Parameters.Add("@EmailID", SqlDbType.NVarChar, 200).Value = TextBox4.Text;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
stored procedure
ALTER PROCEDURE dbo.SubmitRecord1
(
@ID varchar(10),
@Password varchar(50),
@ConfirmPassword varchar(50),
@EmailID varchar(200)
)
AS
INSERT INTO login1(ID,Password,ConfirmPassword,EmailID)VALUES(@ID,@Password,@ConfirmPassword,@EmailID)
RETURN
this worked fine.....
for reference u can see link
Thanks any ways
|
|
|
|