I'm using simple code:
import urllib2
response = urllib2.urlopen("http://www.mysite.com/getfile/4355")
output = open('myfile.zip','wb')
output.write(response.read())
output.close()
The web-server is IIS + ASP.NET MVC 4
It returns FileResult wrapping a zip-file with "application/octet-stream" content-type.
The problem is that downloaded zip file is broken - only 4.1kB size, where it must be 24kB. When I type the url adress in web-browser directly - it downloads and opens fine.
Could you please, suggest, what's wrong with my Python code?
Hello,
I have an asp.net page with a datalist with few textboxes, and a submit button.
when i cahnge the text in the textbox, and click submit, the value i get in the vb code is the old value and not the one i just entered.
Any idea?
thanks
I want to create the membership tables online that are used for ASP.Net 3.5 login controls. I thought their was a script I could use or executable on my computer to install those tables.
Is that the case? or what would be the best method to create the tables online.
How would you troubleshoot a page that is rendering slowly in ASP.NET?
This issue is happening on only specific pages with a few user controls. Other pages work fine. Tracing has clarified that the issue is happening between "Begin Render" and "End Render".
How I can create thumbnail from url.
For example:
Like Digg website, when I submit a link, Digg for me chose a Thumbnail from any images on that URL.
Or like Facebook, when I submit a link, I can chose a thumbnail for that link.
So, how i can do that with asp.net/C#. I just want create thumbnail (not Screen Shot of web page)
Thanks so much.
hey all,
im trying to create a database for a feedback application in ASP.net i have the following database design.
Username (PK)
QuestionNo (PK)
QuestionText
FeedbackNo (PK)
Username
UserFeedbackNo (PK)
FeedbackNo (FK)
QuestionNo (FK)
Answer
Comment
a user has a unique username
a user can have multiple feedbacks
i was wondering if the database design i have here is normalised and suitable for the application
Hi,
I've a very basic ASP.NET MVC application that uses the default routing. Now I need to route all the requests that comes with out a specific URL to one action with a single parameter.
Examples:
www.myapp.com/2374982
www.myapp.com/3242342
should be routed to the same action:
public ActionResult ViewById(intid) ....
Thanks,
Eden
hello
when we create charts in asp.net mvc is it necessary to use chart control?
and if yes then at the time of deployment is it necessary to install chart control?
Thank You
I have windows xp and iis installed , when I want to access localhost to view asp pages , I get the following error :
Server Error
The following error occurred:
[code=SERVER_RESPONSE_CLOSE] The server closed the connection while reading the response. Contact your system administrator.
Please contact the administrator
thank you .
Hi,
I am a beginner to asp.net. I want to sort a gridview but the problem i m facing is when sort event handler is called the exception of stack over flow is thrown. Following is my code for sorting function.
protected void sortGridView(string strSortExpression)
{
if (strSortExpression != string.Empty)
{
if (ViewState["sortOrder"] == "desc")
{
dgvBookInfo.Sort(strSortExpression, SortDirection.Ascending); //string.Format("{0}{1}", );
}
else
{
dgvBookInfo.Sort(strSortExpression, SortDirection.Descending);
}
}
}
Thanks
I have prepared a Silverlight application and my database is in the server. Its running smoothly for small set of data but for large data set giving an error : Remote Serve returned an error:notFound. How can i resolve it,please any one solve this problem.
I have build it in ASP.NET with C#. So kindly provide the solution in C# if possible.
Can somebody tell me how can I close/kill the session when the user closes the browser? I am using stateserver mode for my asp.net web app. The onbeforeunload method is not proper as it fires when user refreshes the page.
We are using two load balancing server for asp.net site in that we have a functionality which will create a receipt of order in pdf using abcpdf component it was working fine without load balancing server and but when we move it to load balancing server it is giving errors like. A generic error occurred in GDI. I have given full rights to directory which is used but still there problem. Does anybody have a solutions for this.
my project is asp.net MVC, using Telerik MVC combobox. I can change the sytle of the first item if I use:
var item = combobox.dropDown.$items.first();
item.addClass('test');
Or change all items, using:
combobox.dropDown.$items.addClass('test');
But I need to change just specific items (based on a model), I tried:
combobox.dropDown.$items[1].addClass('test');
I get this error:
Object doesn't support property or method 'addClass'
In ASP.NET MVC there are generic master views (ViewMaserPage<T>). But what is the purpose of them? As I see it, generic argument of master view and "slave" view must be equal and this constraints me to using the same model for all my views.
I tried to use Controller.TryUpdateModel() of ASP.NET MVC. What does it do in detail. In my example it fails (i.e. returns false). So how can I find out, what is the reason for the failure?
In an ASP.NET environment, what's the best way to play a mp3 file? Do I need to use a flash plugin (some users may not have flash). Also, this needs to work on a IPhone or an IPod.
I have an ASP.NET website with a regular expression validator text box.
I have changed the expression in the regular expression validation property "validator expression" and after compiling (rebuild) and running, the validation CHANGEs are not reflecting.
The previous validation is working fine but the changed validation is not working.
Please help me!
edit:
First code:
([a-zA-Z0-9_-.]+)\@((base.co.uk)|(base.com)|(group.com))
Second code:
@"([a-zA-Z0-9_\-.]+)@((base\.co\.uk)|(base\.com)|(group\.com)|(arg\.co\.uk)|(arggroup\.com))"
hi
I have a File Uploader in my ASP.NET application Using C#, we can upload any type like images, documents, pdf etc.
I m storing it in the Filesystem and having only the Name of the File in DB.
My doubt is can we store the entire file, images in DB. State me Which is good practice and why we need to use it.
Either file System Storage or SQL DB Storage.
I am using swfupload to upload files on a website, the problem that every time the user open the page which contains the upload button, the page loads completely then the flash file start loading from scratch every time the user visit the page with no cache.
Is there a way to preload and cache .swf files in my asp.net page?
Is there a lib i can use to diff between two pieces of code and display it in html? I am using diff - GNU diffutils version 2.7, C#, asp.net. I dont mind the code being in javascript.
I would like just the output with color text + css. I'll build the page around it. Does anyone know a suitable lib?
I was just looking at analytics for an ASP.NET MVC 1 site running on Mono.
I saw that once in a while users are brought to this URL: /?aspxerrorpath=/UrlRouting.axd
What would cause this?
Hi! I' have an telerick asp.net control that generate an html code that contains 2 div's, I resize this div's using js, after that this page is loading in iframe and my div's resize to defalult values, where is the problem??
this is a different question concerning:
http://stackoverflow.com/questions/2360433/add-a-connection-to-database-not-working-asp-net-to-mdf
i am unable to connect because of the noted error message
the database must be read only? but when i click the properties of the file read only is not checked
is there another way it could be read only?