|
It could be any number of things, wrong version of .net framework, a custom control, a dependent assembly is missing, a bad character in the config file. I would suggest you contact godaddy technical support.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: I would suggest you contact godaddy technical support.
ROTFL. They will say 'it's a coding error, fix it yourself'. They say that even when you present evidence that this is not the case. They are worse than useless.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Never used GoDaddy. I'm spoiled by having control over my own environments.
only two letters away from being an asset
|
|
|
|
|
We're a big company, I have been fighting for that ability for some time now.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi All,
I am trying to create Enum Dynamically.
When I try to Save dll It gives me error - "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" I am also writing code snippet :-
AppDomain currentDomain = AppDomain.CurrentDomain;
AssemblyName aName = new AssemblyName("TempAssembly");
AssemblyBuilder ab = currentDomain.DefineDynamicAssembly(aName, AssemblyBuilderAccess.RunAndSave);
ModuleBuilder mb = ab.DefineDynamicModule(aName.Name, aName.Name + ".dll");
EnumBuilder eb = mb.DefineEnum("Elevation", TypeAttributes.Public, typeof(int));
eb.DefineLiteral("Low", 0);
eb.DefineLiteral("High", 1);
Type finished = eb.CreateType();
ab.Save(aName.Name + ".dll");
I got error at last line.
Please help me.
your help is appreciated.
Regards,
Sunil Dhiman
|
|
|
|
|
Is it your web application ? if yes then where the application is hosted ? Do you have the write permission on that dll ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
The code seems to be fine. It should work.
The problem definitely is the FileIOPermission. Check if ASP.NET has write permission to the folder where the dll is created.
|
|
|
|
|
Hi,
In my intranet application (VB.Net, Framework 2) when Iam trying to export data to csv format junk charaters are displayed in place of Arabic data...
When Iam tying to export the same data to Excel it is working fine...
What could be the reason why it is not displaying the junk characters....
Please guide what is going wrong...
Thanks
Imtiaz
Imtiaz A.K
|
|
|
|
|
What encoding are you using? When Unicode characters are included, you should save in Utf8 encoding.
|
|
|
|
|
Iam using the below code..
<br />
da = New SqlDataAdapter(sQuery, Conn)<br />
da.Fill(ds)<br />
Dim GridView1 As New GridView<br />
GridView1.AllowPaging = False<br />
GridView1.DataSource = ds<br />
GridView1.DataBind()<br />
Response.Clear()<br />
Response.Buffer = True<br />
Response.AddHeader("content-disposition", "attachment;filename=Report.csv")<br />
Response.Charset = ""<br />
Response.ContentType = "application/text"<br />
Dim sb As New StringBuilder()<br />
<br />
For k As Integer = 0 To ds.Tables(0).Columns.Count - 1<br />
sb.Append(ds.Tables(0).Columns(k).ColumnName + ","c)<br />
<br />
Next<br />
sb.Append(vbCr & vbLf)<br />
For i As Integer = 0 To ds.Tables(0).Rows.Count - 1<br />
<br />
For k As Integer = 0 To ds.Tables(0).Columns.Count - 1<br />
'add separator <br />
'sb.Append(ds.Tables(0).Rows(i)(k).ToString().Replace(",", ";") + ","c)<br />
sb.Append(ds.Tables(0).Rows(i)(k).ToString() + ",")<br />
Next<br />
'append new line <br />
sb.Append(vbCr & vbLf)<br />
Next<br />
Response.Output.Write(sb.ToString())<br />
Response.Flush()<br />
Response.End()<br />
Is there anything wrong in this code...
But when Iam trying to export the same data to Excel it is working fine....
if the issue is with unicode then it should not also support the Excel....
Please guide..
Imtiaz
Imtiaz A.K
|
|
|
|
|
Try,
Response.ContentEncoding = Encoding.UTF8;
Response.Charset = "UTF-8";
|
|
|
|
|
no change..
same issue..
any other suggestion...
Imtiaz A.K
|
|
|
|
|
Well, csv is only comma-separated values. You can open it in Text editors. If you are downloading a unicode file and open in TextMode it will not be shown properly. try to open the same file in unicode editors. I think you can see them clearly.
Excel format is actually supports Unicode. So if you open a file containing unicode characters in Excel, it will be shown properly.
As Navaneeth suggested, you can make the file download using
Response.ContentEncoding = Encoding.UTF8;
Response.Charset = "UTF-8";
which will ensure that the data downloaded is parsed as Unicode.
|
|
|
|
|
As Iam exporting dataset to csv format ....
Iam opening it in excel only... still it is giving junk characters...please check the code I had added...
this code wil directly prompt a (Open/save)dialog box and when we click open it will open the file in excel...
Even though it is opened in Excel which supports Unicode characters, it is still showing junk values in place of arabic data...
Please suggest...
Thanks..
Imtiaz A.K
|
|
|
|
|
Hello all
When I buy domain and host what should I do to use databases and is database on my hard drive or it's on the server?
|
|
|
|
|
hasani2007 wrote: When I buy domain and host what should I do to use databases and is database on my hard drive or it's on the server?
It should be on server. And how to use it for that you need to contact with the Hosting Site Admin or try to read the help file for that.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hello everyone, I always apologize for my English not perfect. Anyway I wanted to ask you how to load data in a DetailsView without using the SqlDataSource control. I want to load data using only C #, are familiar with the property "DetailsView1.DataSource = fuction ();"
but I'm not sure how it works, someone can explain it to me?
Here's the code that I wrote:
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
DetailsView1.DataSource = aggiorna();<br />
DetailsView1.DataBind(); <br />
}<br />
public DataTable aggiorna()<br />
{<br />
string IDModelloQ = Request.QueryString["IDModelloV"];<br />
SqlCommand comando = new SqlCommand();<br />
SqlConnection connessione = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString);<br />
connessione.Open();<br />
comando.Connection = connessione;<br />
comando.CommandType = CommandType.Text;<br />
comando.CommandText = "SELECT * FROM Automobili WHERE IDModello=" + IDModelloQ;<br />
try<br />
{<br />
comando.ExecuteNonQuery();<br />
<br />
}<br />
catch (Exception ex)<br />
{<br />
throw ex;<br />
}<br />
finally<br />
{<br />
connessione.Close();<br />
}<br />
return What must return!?<br />
}<br />
My problem is that I don't know that since returning from the function "aggiorna ()".
|
|
|
|
|
You are clueless.
To fill a DataTable , you need to use DataAdapter and call Fill on it. Your code also got several issues including SQL injection attacks and improper resource cleanup. Here is a modified version of your code.
public DataTable aggiorna()
{
string IDModelloQ = Request.QueryString["IDModelloV"];
string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;
string query = "SELECT * FROM Automobili WHERE IDModello = @IDModelloQ";
DataTable table = new DataTable();
using(SqlConnection connessione = new SqlConnection(connectionString))
using(SqlCommand comando = new SqlCommand(query, connessione))
{
comando.Parameters.AddWithValue("@IDModelloQ", IDModelloQ);
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = comando;
adapter.Fill(table);
}
return table;
} Don't catch exceptions if you are not doing anything with that. Also
catch (Exception ex)
{
throw ex;
} is stupid. This will clear the stack-trace. To re-throw use just throw .
|
|
|
|
|
Oh I understand ... but I can not find examples with sqladapter!
And that means "clueless"? (I can not find a translation in Italian!)
I know that this code is dangerous and attacked via SQL injection. But how can I do? Through stored procedures?
I apologize but I'm a beginner!
|
|
|
|
|
|
|
_ASPAle_ wrote: I know that this code is dangerous and attacked via SQL injection. But how can I do? Through stored procedures?
The code which I provided takes care SQL injection problems. You do it by writing parameterized queries. The using block in my code ensures resources are properly cleaned up.
_ASPAle_ wrote: I apologize but I'm a beginner!
A book is best for absolute beginners rather than an Internet forum.
_ASPAle_ wrote: And that means "clueless"? (I can not find a translation in Italian!)
Dictionary[^]?
|
|
|
|
|
Will take care ok ... however I have already attended a course of a year to become "web designer", only that the world of Internet is so broad, I starts now to understand how powerful ASP.NET compared to other languages.
Many people underestimate, but wrong, especially those who are in favor of open source like PHP and company! PHP is not very functional for me.
|
|
|
|
|
_ASPAle_ wrote: I starts now to understand how powerful ASP.NET compared to other languages.
A small correction. ASP.NET is not a language. It is a framework which can be programmed using C# or VB.NET. C# and VB.NET are the languages.
|
|
|
|
|
just simply make a dataset and a datatable....
and use sqldataadapter instead of sqlcommand....
and fill the dataset using SqlDataAdapter.fill(Dataset ds, "<tablename>")
then make a datatable
DataTable dt = ds.Tables["<tablename>"];
then ur return statement...
return dt;
|
|
|
|