|
Soumya92 wrote: a webexception is thrown
WHAT exception?
Is the server configured to not accept POST?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
"The underlying connection was closed"
The site works fine in a browser, once you get past the security error, so I assume that the server does accept post.
Is it somehow possible to ignore the certificate errors for the webbrowser control?
~ Soumya92
|
|
|
|
|
hi.please note to my code and help me.source image format is jpeg.
below is my code.thanks.
private void Saveimg(Image image)
{
MemoryStream stream = new MemoryStream();
image.Save(stream,System.Drawing.Imaging.ImageFormat.Jpeg);
byte[]imgdata= new byte[stream.Length];
imgdata= stream.ToArray();
string Filename = "c:\\" + Convert.ToString(DateTime.Now.ToFileTime()) +".jpg";
FileStream fs = new FileStream(Filename, FileMode.CreateNew, FileAccess.Write);
fs.Write(imgdata, 0, imgdata.Length);
fs.Close();
}
|
|
|
|
|
This might be ExternalException ,which means that you are trying to save the image using invalid format.Try to replace in your code System.Drawing.Imaging.ImageFormat.Jpeg
with image.RowFormat .Notice that .jpg or .jpeg extensions could not guarantee that the format is Jpeg.
Life is a stage and we are all actors!
modified on Tuesday, August 18, 2009 5:11 AM
|
|
|
|
|
hi.tanks for answering.
but this again throw exeption.please help me.
|
|
|
|
|
The which kind of exception and where exactly it occurred?
Make sure that Image.RowFormat is not equal to Emf, Exif, Icon, MemoryBmp Wmf,which might be not supported by the Image.Save(Stream,ImageFormat) method used into your code.
Life is a stage and we are all actors!
modified on Tuesday, August 18, 2009 7:56 AM
|
|
|
|
|
I have a similiar situation when saving an image, no matter what type.
It's a local winform client application. When I'm logged onto the machine (I am admistrator) it works fine. When other users without admin rights are logged on, the generic GDI+ error occurs while saving the image. Any ideas on how to get around this?
Using Image.Save taking a .png, .jpeg, or .bmp file types, seems to make no difference.
|
|
|
|
|
Same sh*t.
Save method creates file, but doesn't write.
And the very strange is GDI+ error. As soon as I know it doesn't return any error besides cases when the pointer to Image raw data is not returned.
In fact, GDI+ deals with windows context (Device Context) of the control where image is shown.
Therefore, it might be GDI+ API can't get the control's handle or doesn't has an access right to the control.. maybe .NET blocks the access to its controls from outside dll request.
From other side all components are in the same thread, though maybe this Save operation opens new thread????
Any idea?
|
|
|
|
|
I have created a PDF file. Now i want to disabled it's menu items.
Can anyone help me out in this.
Thanx in advance.
|
|
|
|
|
You need to use the ViewerPreferences entry in the document catalog. Refer to the PDF specification document from Adobe for details.
btw this is not, strictly speaking, a .NET framework question, please read How to get an answer to your question
|
|
|
|
|
I Download code sample from codeproject site.
For Sending sms from aspnet website.
but it not working
Can U help me
I Used following code.
try
{
SmsTest.net.webservicex.www.SendSMS smsIndia= new SmsTest.net.webservicex.www.SendSMS();
SmsTest.com.webservicex.www.SendSMSWorld smsWorld = new SmsTest.com.webservicex.www.SendSMSWorld();
if(rdoType.SelectedValue == "1")
smsIndia.SendSMSToIndia(txtMobileNo.Text.Trim(), txtEmailId.Text.Trim(), txtMessage.Text);
else
smsWorld.sendSMS(txtEmailId.Text.Trim(), txtCountryCode.Text.Trim(), txtMobileNo.Text.Trim(), txtMessage.Text);
lblMessage.Visible = true;
lblMessage.Text="Message Send Succesfully";
}
catch(Exception ex)
{
lblMessage.Visible = true;
lblMessage.Text="Error in Sending message"+ex.ToString();
}
|
|
|
|
|
|
Hi all... Did anyone got solution for this problem....
Are you able to send sms using this code??
|
|
|
|
|
I am developing a component and for backcolor, how can i diaplay radial gradient in rectangle withoout using WPF framework.
i the rectangle below i want to display col1, color2, and col3 in gradient pattern.i dont how to give gradient effect of col3.please help me
|---------------------|
| |
| color1 |
| |
|---------------------|
| . . color2 |
| . . |
| . color3 . |
|---------------------|
|
|
|
|
|
Take a look at the documentation for PathGradientBrush class and its SurroundColors property.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
Here[^] is an example using PathGradientBrush.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
i have crystall reports which are developed with version 10
these reports are visible in visual studio 2005 but not visible in visual studio 2008 and gives error to create control
is there any solution plz help me
thanks
|
|
|
|
|
Crystal report Tile, can it be changed in the same report? For example, after the first two pages the title will change to something different ... this goes on ... after a few pages, the title changes again to a different one.
|
|
|
|
|
hi
Actually i want to ceate a file downloding method in ASP.NET also i want to know fileuploading method........ in ASP. NET?
so send me ....how to create this in asp.net 2.0?????
|
|
|
|
|
How about I "send you" to the right message board ....
ASP.NET Messageboards[^]
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Hi,
my datatable contains the following columns...
resultsView.Columns.Add("Fam.", typeof(string));
resultsView.Columns.Add("Component", typeof(int));
resultsView.Columns.Add("Description", typeof(string));
resultsView.Columns.Add("Quantity", typeof(double));
resultsView.Columns.Add("Unit", typeof(string));
resultsView.Columns.Add("Unit Price", typeof(double));
resultsView.Columns.Add("Total", typeof(double));
i have a datatable,
I use IEqualityComparer to get distinct rows.
Im able to get the distinct rows...
What my problem is If i find same rows, i need to increase a columnValue in this datatable.
I mean i have column named "component" in my datatable, so if two rows are same, then i need to get one row with component value increased by 1 using IEqualitycomparer. What i get now is only one row with component column value not increased...
cud anyone plz help me to solve this problem??
|
|
|
|
|
It is difficult to help you without seeing the code you are using.
Please post your code. If you do so then please put the code between <pre>your code here</pre> tags to maintain the formatting and make it readable.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
thanks for ur reply,
here is my code....
my datatable(named as sortedDataTable) has columns as in my previous message... and i use iequalitycomparer as below
IEnumerable<DataRow> drdistinct = sortedDataTable.AsEnumerable().Distinct(new MyDataRowComparer());
in my iequalitycomparer class i have these codes...
<pre>
class MyDataRowComparer : IEqualityComparer<DataRow>
{
public MyDataRowComparer()
{
}
public bool Equals(DataRow x, DataRow y)
{
if (x.Field<string>("Fam.") == y.Field<string>("Fam.") && x.Field<string>("Description") == y.Field<string>("Description"))
{
x["Component"] = Convert.ToInt16(x["Component"]) + 1;
x["Quantity"] = Convert.ToDouble(x["Quantity"]) + Convert.ToDouble(y["Quantity"]);
//y.Delete();
return true;
}
else
return false;
}
public int GetHashCode(DataRow obj)
{
int a = obj.Field<string>("Fam.").GetHashCode();
int b = obj.Field<string>("Description").GetHashCode();
// obj["Component"] = Convert.ToInt16(obj["Component"]) + 1;
//x["Quantity"] = Convert.ToDouble(x["Quantity"]) + Convert.ToDouble(y["Quantity"]);
return a + b;
} </pre>
these code, works fine and it returns me only the distinct rows, but this gethashcode method adds the first row and then compares it with subsequent rows, so if i apend column values in equals method as in above, it doesnt affect the datatable as it adds the row in the begining itself..
|
|
|
|
|
It seems to me that your problem would be better solved by a properly constructed Stored Procedure in your database.
I am not particularly good at SQL so if this idea appeals, you might get a better solution in the General Database Forum.
However, something like:
SELECT
Fam., Description, etc.,
SUM(Component) AS "Component Total",
SUM(Quantity) AS "Quantity Total"
FROM
your_table
GROUP BY
Fam., Description
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
im not using database. I have one datatable which has all rows (duplicate rows)... I want to create another datatable which contains distinct rows and while getting the distinct rows, i have to add "component" column value.
|
|
|
|