|
Most likely cause is, your file is not in that network location. What makes you think it would be ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i can access the share folder, so i copied some images into that share folder, so i know that the file is in the share folder
can you pls give me the code any one how to access the image in share folder from web server. im able to access it from client machine.
|
|
|
|
|
Your web app doesn't have permission to wander the network like that, I don't believe. I am still struggling with why you'd want to.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
try to debug the code and check the value of imagefile.
if every thing is fine try with IPaddress rather than hostname.
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
I am a young programmer trying to create a DLL Code-Behind. I have found a lot of information about doing this in VB, but not so much with the command prompt. I think it is an easy fix with the <% informtion %> [this is called....header information, meta data?] but cannot seem to get it.
Here is what I have from the command prompt:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>csc /target:library c:\file.cs
I did make sure the file.cs and file.aspx file are in the c:\ location.
From the .aspx file:
<![CDATA[<%@ Page Inherits="alpha.wp3" Language="C#" Debug="true" %>]]><br />
<br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server">...</head></html>
From the .cs file:
using System;<br />
using System.Collections;<br />
using System.Configuration;<br />
using System.Data;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.HtmlControls;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Drawing;<br />
using System.Text;<br />
<br />
namespace alpha<br />
{<br />
public class wp3 : System.Web.UI.Page<br />
{...
The command prompt throws a ton of errors for my values in the aspx file, such as:
c:\file.cs(102,30) error CS0103: The name 'inreal' does not exist in the current context
c:\file.cs(103,31) error CS0103: The name 'inimaginary' does not exist in the current context
These values are in the .aspx file, like these:
<asp:textbox id="inReal" value="0" runat="Server" /><br />
<asp:textbox id="inImaginary" value="0" runat="Server" />
I am sorry this is to long and perhaps scatter-brained. Since I am so new to C# and .net I am trying to be descriptive.
|
|
|
|
|
Why don't you download the Web Dev Visual Studio Express Edition ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I saw this once but I lost where I saw it.
There is a demo here somewhere of how to make a submit button on an asp.net form disabled and then enable it when it is time for the user to click on it.
|
|
|
|
|
You would just use javascript to do this, checking if it's valid to submit every time a required form element changes.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I don't know where you lost it, but I do know where you can find it.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
This should be simple but it just ain't working. I'm getting the following error whenever I submit it!
An existing connection was forcibly closed by the remote host
My web.config file contains the following;
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="smtp.bizmail.yahoo.com"
password="password"
port="465"
userName="username" />
</smtp>
</mailSettings>
</system.net>
And my code looks like this;
//Code starts here, we access the webconfig here
System.Configuration.Configuration myConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);
System.Net.Configuration.MailSettingsSectionGroup mySettings = ((System.Net.Configuration.MailSettingsSectionGroup)myConfig.GetSectionGroup("system.net/mailSettings"));
//Obtain credentials from web.config file under mailsettings node
System.Net.NetworkCredential myCredential = new System.Net.NetworkCredential(mySettings.Smtp.Network.UserName, mySettings.Smtp.Network.Password);
//Create an SMTP client here, can be found on account settings in outlook
System.Net.Mail.SmtpClient myClient = new System.Net.Mail.SmtpClient();
myClient.Host = mySettings.Smtp.Network.Host;
myClient.Port = mySettings.Smtp.Network.Port;
myClient.Credentials = myCredential;
myClient.EnableSsl = true;
//Build email message here:
System.Net.Mail.MailMessage myEmail = new System.Net.Mail.MailMessage();
myEmail.From = new System.Net.Mail.MailAddress(from);
myEmail.To.Add("mhankey@hq4thmarinescomm.com");
myEmail.Subject = "Feedback";
myEmail.IsBodyHtml = false;
myEmail.Body = body;
myClient.Send(myEmail);
myEmail.Dispose();
Much obliged,
Mike
|
|
|
|
|
Mike Hankey wrote: port="465"
Are you behind a firewall?
Mike Hankey wrote: userName="username" />
you have an email account on yahoo called "username" with a password of "password"?
led mike
|
|
|
|
|
led mike wrote: Are you behind a firewall?
Just XP firewall but that the port they told me to use. Oddly if I use the obsolete CDO to do email it works using these settings.
MailMessage mailMsg = new MailMessage();
mailMsg.From = from;
mailMsg.To = "mhankey@hq4thmarinescomm.com";
mailMsg.Subject = "Auto generated answer from Mike Hankey";
mailMsg.Body = body;
// Smtp configuration
SmtpMail.SmtpServer = "smtp.bizmail.yahoo.com";
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username");
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465");
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
SmtpMail.Send(mailMsg);
led mike wrote: you have an email account on yahoo called "username" with a password of "password"?
Didn't want to advertise such info here!
Thanks
Mike
|
|
|
|
|
Mike Hankey wrote: An existing connection was forcibly closed by the remote host
The most probable cause being the SMTP service is not running or a firewall software is preventing connections to the SMTP service.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Vasudevan,
Thank you for your response. I got it to work by using port 587 instead of 465. After googling at length I found that this is a common problem?
Mike
|
|
|
|
|
Hello All,
Got a funny kind of a problem that I am not sure how to correct.
I have a login page with the normal 2 text boxes and yadda yadda yadda. But, I also have a couple of "asp:LinkButton" on the page. No problem yet; but here it is: I have 2 RequiredFieldValidators on the page also, so if a user decides not to log in and clicks one of the asp:LinkButton links, the form will not post because the text boxes are empty.
Does anyone have any ideas how to get around this?
Thanks in advance for any assistance offered.
|
|
|
|
|
This article[^] explains how to disable client-side validation in Javascript.
Alternatively, if your links are just redirecting to another page then change them from LinkButton controls into normal HTML anchor tags. Form validation won't apply if the browser is simply requesting another page.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello,
I have a web app where I am able to authenticate logins against Active Directory locally. However when I deploy the application to the production server and try to authenticate it says "The server is not operational." Can anyone please advise what I'm doing wrong?...Thanks in advance.
|
|
|
|
|
what path you have give for AD?
Try to run it from you Browser
ldap://ip address/
and let me know the result
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
I tried to export gridview info to excel. I got this error.
Control 'grdLIST' of type 'GridView' must be placed inside a form tag with runat=server.
This my gridview design.
<asp:GridView ID="grdLIST" runat="server" Visible="False">
</asp:GridView>
I didn't setup fields, because field name is changing due to date term.
This is aspx codeing
protected void cmdEXCEL_Click(object sender, EventArgs e)
{
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("content-disposition", "attachment;filename=CadilacReport.xls");
Response.Charset = string.Empty;
Response.Cache.SetCacheability(System.Web.HttpCacheability.Public);
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
if (grdLIST.HeaderRow != null && grdLIST.HeaderRow.Cells != null)
{
for (int ct = 0; ct < grdLIST.HeaderRow.Cells.Count; ct++)
{
string headerText = grdLIST.HeaderRow.Cells[ct].Text;
if (grdLIST.HeaderRow.Cells[ct].HasControls())
{
if (grdLIST.HeaderRow.Cells[ct].Controls[0].GetType().ToString() == "System.Web.UI.WebControls.DataCountrlLinkButton")
{
headerText = ((LinkButton)grdLIST.HeaderRow.Cells[ct].Controls[0]).Text;
}
grdLIST.HeaderRow.Cells[ct].Controls.Clear();
}
grdLIST.HeaderRow.Cells[ct].Text = headerText;
}
}
if (grdLIST.FooterRow != null)
{
grdLIST.FooterRow.Visible = false;
}
grdLIST.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
}
at grdLIST.RenderControl(htmlWrite);, I got that error. How can I solve it? Please help.
|
|
|
|
|
Hi,
If you look at your source code of your aspx page, you might be missing the following tag below the body tag.
(Your grid declaration should be in here)
Hope this solves your problem.
Regards,
Elizma
|
|
|
|
|
I do have that tag in aspx page coding. Anything else?
|
|
|
|
|
Hi I have a scenario in my aspx page. when I click on Rates Hyperlink in Rates.aspx page it should display all the countries alphabetical order.
The page looks like this:
A.. A B C D E F G..........X Y Z
Country .. withoutTax .. inclTax
Africa...... 12 ...... . .. 14
America..... . 13 .... ... .. 15
..
..
..
B.. A B C D E F G..........X Y Z
Country.. withoutTax .. InclTax
Barma ...... 12 ...... . .. 14
Bengal..... . 13 .... ... .. 15
..
..
I have one xml file called CountriesList.xml. It contains all the country names. I have to read only country names starting with A and display under A , like B,c....
How can I implement this? am using asp.net 2.0
please see the below link for your reference. I have to implement as it is.
http://www.skype.com/prices/callrates/[^]
Thanks
|
|
|
|
|
Assuming your xml schema looks something like this:
<br />
<countries><br />
<country><br />
<name>Africa</name><br />
<withoutTax>12</withoutTax><br />
<inclTax>14></inclTax><br />
</country><br />
</countries><br />
Load the xml into XmlDocument, create an Xsl file which defines how you want to format the output and accepts an argument named "firstLetter". Load the xsl file into an XslTransform object and call the transform method passing in the XmlDocument and a defined XsltArguments object which includes the letter selected by the user.
In your Xsl document use the "subtring" function to filter the output with an expression like this:
<xsl:template match="/"><br />
<table><br />
<tr><br />
<td>country</td><br />
<td>without tax</td><br />
<td>incl tax</td><br />
</tr><br />
<xsl:apply-templates select="//country[substring(name, 1,1) = $firstLetter]" /><br />
</table><br />
</xsl:template><br />
<br />
<xsl:template match="country"><br />
<tr><br />
<td><xsl:value-of select="name" /></td><br />
<td><xsl:value-of select="withoutTax" /></td><br />
<td><xsl:value-of select="inclTax" /></td><br />
</tr><br />
</xsl:template>
Where "firstLetter" is the argument passed to the stylesheet.
The output of the XslTransform.Transform method is your Html output for your page.
|
|
|
|
|
I am downloading an excel file to client PC using Response.writefile method. This method works fine if i open my page using window.open but its not working on modal window. can anybody help me in this regard?
Your help is appreciated.
saud
|
|
|
|
|
Hi lam satish,
Iam calling a web service which contains addition,subtraction,
multiplication,division methods. so these things, i have to call asynchronously using java script, with out post to the server.so give me reply as early as possible.
Thanks & Regards
satish.
|
|
|
|