Problem had been Fixed
Following a tutorial on MSDN- I created and accessed a WCF services with the Northwind database just fine. With different data, I followed the same process: defined my ADO.NET entity model, created the data service, and enabled access to resources, but I am receiving an error. The error on the webpage only says "Request Error." I have IIS 8.0 express installed, both web.configs are similar, and WCF service is enabled.
I put a break point on InitializeService(), but it never hits that sub. I am not sure where to go from here.
IIS Log file
Software: Microsoft Internet Information Services 8.0
Version: 1.0
Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip vcs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2013-09-14 09:47:04 ::1 GET /tinytrots.svc - 50274 - ::1 Mozilla/5.0+>>(Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/29.0.1547.66+Safari/537.36 -> 307 0 0 769
2013-09-14 09:47:04 ::1 GET /tinytrots.svc/ - 50274 - ::1 Mozilla/5.0+> (Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/29.0.1547.66+Safari/537.36 - >500 0 0 608
IIS TraceLogFiles
ModuleName: ManagedPipelineHandler
Notification: EXECUTE_REQUEST_HANDLER
HttpStatus: 500
HttpReason: Internal Server Error
HttpSubStatus: 0
ErrorCode: The operation completed successfully.(0x0)
Event Viwer
My Application logs says "The direcoty specified for caching compressed content C:\Users\Me\AppData\Local\Temp\iisexpress\ISS Temporary Compressed Files\ Clr4IntegratedAppPool is invalid. Static compression is being disabled."
The Data Service
Public Class tinytrots
Inherits DataService(Of TinyTrotsDBEntities)
Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration)
config.SetEntitySetAccessRule("Activities", EntitySetRights.All)
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3
End Sub
End Class
Had to run this command to register the required script maps in IIS: >"%WINDIR%\Microsoft.Net\Framework\v4.0.30319\ServiceModelReg.exe" -r
http://www.msdn.microsoft.com/en-us/library/ms751527.aspx
http://www.msdn.microsoft.com/en-us/library/ms752252.aspx
Related
We are using Magento e-commerce platform for our shopping site behind AWS Cloudfront. In the create page WYSIWYG, there's an option to upload images. Some users are reporting the 403 error is occurring after they choose the image and press the upload button, whilst for others uploading images works.
I don't see any error messages in the nginx access or error logs at the time the 403 occurs for some of these users. However, I do see the following error in the CloudFront log:
date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer) cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x-host-header cs-protocol cs-bytes time-taken x-forwarded-for ssl-protocol ssl-cipher x-edge-response-result-type cs-protocol-version fle-status fle-encrypted-fields c-port time-to-first-byte x-edge-detailed-result-type sc-content-type sc-content-len sc-range-start sc-range-end
2020-01-20 10:22:13 MAN50-C1 570 xx.xx.xx.xx POST jhgfjgfjsd.cloudfront.net /index.php/ctrl-web-team/cms_wysiwyg_images/upload/type/image/key/88fdfad6d6b726871662108fad3d3de3/ 403 https://www.example.com/index.php/ctrl-web-team/cms_page/new/key/c7e419205e2c23c854cd4ea1d741bdad/ Mozilla/5.0%20(X11;%20Linux%20x86_64;%20rv:72.0)%20Gecko/20100101%20Firefox/72.0 SID=gm892fbgp7lep0 - Error Z6p-RiAuq7RA7ryi3iNHD== www.example.com https 16778 0.844 - TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 Error HTTP/2.0 - - 42776 0.844 Error text/html 134 - -
2020-01-20 10:22:17 MAN50-C1 1547 xx.xx.xx.xx POST jhgfjgfjsd.cloudfront.net /index.php/ctrl-web-team/cms_wysiwyg_images/contents/type/image/key/0f36c05043efc3435jj342d6a3071e6a47/ 200 https://www.example.com/index.php/ctrl-web-team/cms_page/new/key/c7e419205e2c23c854cd4ea1d741bdad/ Mozilla/5.0%20(X11;%20Linux%20x86_64;%20rv:72.0)%20Gecko/20100101%20Firefox/72.0 isAjax=true - Miss nu8CAYvBxQnpvMbAhdgdf= www.example.com https 545 0.612 - TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 Miss HTTP/2.0 - - 42776 0.612 Miss text/html;%20charset=UTF-8 - - -
Any guidance appreciated.
The error occurred as some requests were being blocked by the AWS WAF (web application firewall). Review the rules associated with ACL in WAF.
I had to define an additional "String and regex matching" rule in the AWS WAF Classic to allow the requests.
A wordpress site hosted in iis was working fine earlier. Due to maintenance, server been shut down for a week, after restart i tried to backup my wordpress site. Trouble started when i tried to take wordpress backup by browsing into wp-admin page. I couldnt load the wp-admin page since the webpage is not servable by iis. It says site could not be reached. Took too long to respond.
Have tried hosting a new website with hello world html which this works fine. https://support.microsoft.com/en-us/help/279729/web-pages-not-serving-from-iis
Have tried following but same result.
Have changed port number.
Have stopped the other websites, and browsed the site in iis.
Have placed the sample hello world file inside the wordpress and tried to browse.
Looked into eventviewer -> Windows logs -> Application. No logs related to iis
Looked into %SystemDrive%\inetpub\logs\LogFiles logs it shows,
/#Software: Microsoft Internet Information Services 10.0
/#Version: 1.0
/#Date: 2019-06-12 12:55:53
/#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2019-06-12 12:55:53 ::1 GET / - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/74.0.3729.169+Safari/537.36 - 200 0 0 361
2019-06-12 12:55:53 ::1 GET /iisstart.png - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/74.0.3729.169+Safari/537.36 http://localhost/ 200 0 0 4
2019-06-12 12:55:53 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/74.0.3729.169+Safari/537.36 http://localhost/ 404 0 2 4
Clueless to proceed further. Any directions is much appreciated.
I must move my wordpress website from one server to another. There is no way to backup it, so I copied wp-content files and moved to the new server. Also I moved database, so in my new server I have same database, same user, same password, also I changes user and password info in wp-config.php file.
But there is a problem such:
Internal Server Error The server encountered an internal error or
misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the
error occurred and of anything you might have done that may have
caused the error.
More information about this error may be available in the server error
log.
and here is error log:
#Software: Microsoft Internet Information Services 8.0
#Version: 1.0
#Date: 2015-06-24 22:07:41
#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2015-06-24 22:07:40 W3SVC181 P3NWVPWEB067 50.62.160.227 GET /admin.php - 80 - 193.201.227.78 HTTP/1.0 Opera/9.80+(Windows+NT+6.1;+U;+ru)+Presto/2.8.131+Version/11.10 - - voskevaz.info 404 0 2 1333 179 4843
2015-06-24 22:07:40 W3SVC181 P3NWVPWEB067 50.62.160.227 GET /administrator/index.php - 80 - 193.201.227.78 HTTP/1.0 Opera/9.80+(Windows+NT+6.1;+U;+ru)+Presto/2.8.131+Version/11.10 - - voskevaz.info 404 0 2 1333 193 203
2015-06-24 22:07:43 W3SVC181 P3NWVPWEB067 50.62.160.227 GET /wp-login.php - 80 - 193.201.227.78 HTTP/1.0 Opera/9.80+(Windows+NT+6.1;+U;+ru)+Presto/2.8.131+Version/11.10 - - voskevaz.info 302 0 0 564 182 1250
I really don't know what does it mean and how to fix it.
Thanks
The lack of a 5xx response code in your log file is interesting.
In the log extract you posted above, the last line is a request for /wp-admin.php, and is served with a 302 response code, which means it was redirected somewhere else.
I'm guessing this is happening because you configured the site to only allow users to log in over a secure (HTTPS) connection. So when you visit http://··(your site)··/wp-login.php, you're being redirected to https://··(your site)··/wp-login.php. If the new site doesn't have a proper SSL certificate installed, this will cause an error. (And it looks like your site is logging HTTPS traffic somewhere else.)
To prevent this from happening, edit /wp-config.php and change define('FORCE_SSL_LOGIN', true); to define('FORCE_SSL_LOGIN', false);.
I'm trying to get Web Deploy to work from Web Matrix and I've searched through through all the logs and events and can't seem to find the source of the following error in the event viewer:
Log Name: Microsoft Web Deploy
Source: Web Deploy
Date: 9/4/2013 1:48:16 PM
Event ID: 1
Task Category: None
Level: Error
Keywords: Classic
User: XXX
Computer: XX
Description:
User:
Client IP:
Content-Type:
Version: 9.0.0.0
MSDeploy.VersionMin: 7.1.600.0
MSDeploy.VersionMax: 9.0.1762.0
MSDeploy.Method: GetPackage
MSDeploy.RequestId: 4cab8a9b-5c5c-4f99-8141-52e5453b88f9
MSDeploy.RequestCulture: en-US
MSDeploy.RequestUICulture: en-US
ServerVersion: 9.0.1762.0
Skip: objectName="^configProtectedData$"
Provider: iisApp, Path: xxx.xxx.xxx
A tracing deployment agent exception occurred that was propagated to the client. Request ID '4cab8a9b-5c5c-4f99-8141-52e5453b88f9'. Request Timestamp: '9/4/2013 1:48:15 PM'. Error Details:
System.Web.HttpException: The remote host closed the connection. The error code is 0x800704CD.
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush)
at System.IO.BufferedStream.FlushWrite()
at System.IO.BufferedStream.Flush()
at System.IO.BufferedStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at Microsoft.Web.Deployment.PackageSerializer.Dispose()
at Microsoft.Web.Deployment.DeploymentAgent.HandleGetPackage(DeploymentAgentWorkerRequest workerRequest)
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequestWorker(DeploymentAgentAsyncData asyncData)
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Web Deploy" />
<EventID Qualifiers="0">1</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-09-04T17:48:16.000000000Z" />
<EventRecordID>238</EventRecordID>
<Channel>Microsoft Web Deploy</Channel>
<Computer>xxxx</Computer>
<Security UserID="S-1-5-21-3588641846-14347574-4076679054-500" />
</System>
<EventData>
<Data>User:
Client IP:
Content-Type:
Version: 9.0.0.0
MSDeploy.VersionMin: 7.1.600.0
MSDeploy.VersionMax: 9.0.1762.0
MSDeploy.Method: GetPackage
MSDeploy.RequestId: 4cab8a9b-5c5c-4f99-8141-52e5453b88f9
MSDeploy.RequestCulture: en-US
MSDeploy.RequestUICulture: en-US
ServerVersion: 9.0.1762.0
Skip: objectName="^configProtectedData$"
Provider: iisApp, Path: xxx.xxx.xxx
A tracing deployment agent exception occurred that was propagated to the client. Request ID '4cab8a9b-5c5c-4f99-8141-52e5453b88f9'. Request Timestamp: '9/4/2013 1:48:15 PM'. Error Details:
System.Web.HttpException: The remote host closed the connection. The error code is 0x800704CD.
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush)
at System.IO.BufferedStream.FlushWrite()
at System.IO.BufferedStream.Flush()
at System.IO.BufferedStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at Microsoft.Web.Deployment.PackageSerializer.Dispose()
at Microsoft.Web.Deployment.DeploymentAgent.HandleGetPackage(DeploymentAgentWorkerRequest workerRequest)
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequestWorker(DeploymentAgentAsyncData asyncData)
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData)
</Data>
</EventData>
</Event>
I used Web Deploy on the server to create the settings file using IIS on the host. This error appears during the simple web page compatibility test. Any clues as to what may be going on?
The error is basically because the remote server, or the hosting service provider closed the request.
Sometimes it is also stated as the server is trying to deny or is try to cancel the requests. For instance, a user started to download some file or a page, and the server is off so the download would be cancelled, or the download would fail.
There are many issues for this error code.
Here is a post from another forum. forums.asp.net
The best method would be to check the settings on the server that you are having hosting from. Or contact them directly to get help regarding this issue.
Edit:
Getting LogFiles:
You can get the LogFiles here:
start --> run --> LogFiles
2011-09-20 21:25:25 xx.xxx.xxx.xxx 36482 192.168.10.32 80 HTTP/1.1 POST /orders/mail/mailorderentry - - Timer_HeaderWait –
2011-09-20 21:22:29 xx.xxx.xxx.xxx 44399 192.168.10.32 80 HTTP/1.1 POST /orders/mail/mailorderentry - - Client_Reset –
HttpRunTime:
Secondly the request closed issue can also raise if the httpRunTime is out (timeout). But that exception isn't here I am sure, however still try this too: http://msdn.microsoft.com/en-us/library/e1f13641.aspx
Antivirus (If any):
Also, please try check if Antivirus is installed, then is it allowing the server to communicate with users or not? Sometimes along with Firewall, Antivirus might also try to stop the connections.
I recently had the exact same eventLogs, after the webmatrix web deploy throwed a "can not publish" (without any apparent reasons because it worked several month so far).
After some searches (unlucky) and a lot of fumbling, I got it to work again just by using a windows user with administrator privileges instead of the IIS Manager Users configuration.
I am trying to connect to a Servlet with my j2me application and it's not happening.
Case 1:
1)Deploy the servlet on the local machine.
2)Connect to the servlet on the local machine with j2me app and wait for the servlet to return a a value
3)J2ME gets the value from the servlet and displays on the screen.
Works smooth!
Case 2:
1)Deploy the servlet on a remote machine.
2)Connect to the servlet on the remote machine with j2me app and wait for the servlet to return a a value
3)J2me gets an error saying empty response. Why?
Here is my code:
Case 1: MIDlet deployed on local machine
HttpConnection c = (HttpConnection) Connector.open("http://localhost:8999/PercentileCalculator/PercentileCalculator");
c.setRequestProperty("User-Agent","Profile/MIDP-2.0, Configuration/CLDC-1.1");
c.setRequestProperty("Content-Language","en-US");
c.setRequestMethod(HttpConnection.POST);
DataOutputStream os = (DataOutputStream)c.openDataOutputStream();
os.writeUTF("100");
os.writeUTF("Test 1");
os.writeByte(12);
os.flush();
os.close();
// Get the response from the servlet page.
DataInputStream is =(DataInputStream)c.openDataInputStream();
Case 2: MIDlet deployed on remote machine
HttpConnection c = (HttpConnection) Connector.open("Url goes here");
c.setRequestProperty("User-Agent","Profile/MIDP-2.0, Configuration/CLDC-1.1");
c.setRequestProperty("Content-Language","en-US");
c.setRequestMethod(HttpConnection.POST);
DataOutputStream os = (DataOutputStream)c.openDataOutputStream();
os.writeUTF("100");
os.writeUTF("Test1");
os.writeByte(12);
os.flush(); -->Exception thrown here.
os.close();
// Get the response from the servlet page.
DataInputStream is =(DataInputStream)c.openDataInputStream();
What could be the issue?
Update 1 : 12.01AM 5 may Sunday
I am able to call my remote servlet using my midlet. I wrote a sql to connect to a mysql DB and add a new row to the DB for every call the midlet makes to the remote servlet. And yes this works.
Now the issue is...why is the remote servlet not able to return values to my midlet. Why do I always get an empty response?
Update 2: 9.46 am 8 may Tuesday
In case 2, I replaced the URL with the foll:
www.google.com --> got a response from google ..some xml string
www.facebook.com --> got a response..which was actually a null pointer exception
m.facebook.com--> got a response from facebook...some xml string
www.yahoo.com ---> no response
Now I feel that my servlet needs to print an xml string and not a normal http page. Please pour in...
Update 3 8.41am 14 may Monday
I tried accessing a friends website using my j2me code. That is, I just replace the URL in case 2 with something like http://www.friend'sURL.in --> worked(got a response)
Then, I tried http://www.mywebsiteURL.in --> empty response
So, I feel there is something wrong with my server/webhosting... no idea.
UPDATE 4 22 MAY 2012 TUESDAY
On telmo's suggestion I looked into my server logs and they are as follows:
1)Log Fields
#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2)Requests from a browser using my desktop (2requests have been shown)
2012-05-21 04:39:06 W3SVC6826 BJJI-GLOBEDNS 67.227.164.68 GET /Servlet/PercentileCalculator - 80 - 116.203.33.229 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/536.5+(KHTML,+like+Gecko)+Chrome/19.0.1084.46+Safari/536.5 - - n10k.in 200 0 0 485 395 421
2012-05-21 04:39:08 W3SVC6826 BJJI-GLOBEDNS 67.227.164.68 GET /favicon.ico - 80 - 116.203.33.229 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/536.5+(KHTML,+like+Gecko)+Chrome/19.0.1084.46+Safari/536.5 - - n10k.in 200 0 0 17863 318 2203
3)Requests from my midlet (emulator on my PC) (2 requests shown)
2012-05-21 04:43:17 W3SVC6826 BJJI-GLOBEDNS 67.227.164.68 POST /Servlet/PercentileCalculator - 80 - 116.203.33.229 HTTP/1.1 Profile/MIDP-1.0,+Configuration/CLDC-1.0 - - n10k.in 200 0 0 0 196 468
2012-05-21 04:43:25 W3SVC6826 BJJI-GLOBEDNS 67.227.164.68 POST /Servlet/PercentileCalculator - 80 - 116.203.33.229 HTTP/1.1 Profile/MIDP-1.0,+Configuration/CLDC-1.0 - - n10k.in 200 0 0 0 196 453
ANALYSIS OF THE LOGS
So I tried to analyze the logs and I was not quite successful in interpreting them. The only difference that I could make out between the browser request and midlet request is:
Browser request returns response -> 200 0 0 17863 318 2203
Midlet request returns response -> 200 0 0 0 196 453
The 4th number (SC Bytes -> Bytes Sent) in case of midlet request is 0. That's all that I could make out. Could anyone help?
UPDATE 5 1st june 2012 Friday 11.33 PM
1)I created a HTML file on my server and then tried accessing it with the midlet and I could access it.
2) Next, I created a PHP page and then tried accessing that with the midlet and I could access it.
3)Then i tried accessing a JSP page and got an empty response.
4) I tried accessing all the servlets deployed on my server and always got an empty response.
5) I tried to access some servlets on the internet but could not find any.
INFERENCE
There is something fishy with the way my servlet outputs the HTML page. I have posted that piece of code here. Please assist.
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try{
response.setContentType("text/html");
reply = response.getWriter();
reply.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html\"><title>Nikhil D</title></head><body>hmmm</body></html>");
reply.close();
reply.flush();
}
catch(Exception e)
{
}
I am not quite able to figure out whats wrong here. Its probably the manner in which my server renders my servlets/ JSP pages. No idea!
UPDATE 6 : 13th JUNE 2012
Can't waste more time on this. Work around posted in an answer below
So after all that research this is what I did:
1) Pass parameters from MIDlet to a PHP page on my server.
2) Forward the parameters from PHP page to my SERVLET
3) PHP page collects the result of the SERVLET
4) MIDlet reads the result from the PHP page.
Ta Dang! works!